Top "Nsnotificationcenter" questions

NSNotificationCenter allows to send and register for notifications in the Foundation framework, which is provided by Apple.

Send and receive messages through NSNotificationCenter in Objective-C?

I am attempting to send and receive messages through NSNotificationCenter in Objective-C. However, I haven't been able to find any …

ios objective-c nsnotificationcenter
NSNotificationCenter addObserver in Swift

How do you add an observer in Swift to the default notification center? I'm trying to port this line of …

ios swift nsnotificationcenter
Move view with keyboard using Swift

I have an app that has a text field on the lower half of the view. This means that when …

ios swift uikit nsnotificationcenter uikeyboard
How to pass data using NotificationCenter in swift 3.0 and NSNotificationCenter in swift 2.0?

I'm implementing socket.io in my swift ios app. Currently on several panels I'm listening to the server and wait …

ios swift swift3 nsnotificationcenter nsnotifications
How to pass object with NSNotificationCenter

I am trying to pass an object from my app delegate to a notification receiver in another class. I want …

objective-c swift cocoa-touch nsnotificationcenter nsnotifications
how to use the object property of NSNotificationcenter

Could somebody please show me how to use the object property on NSNotifcationCenter. I want to be able to use …

iphone objective-c cocoa nsnotificationcenter
Detecting Network Connectivity Changes using Reachability, NSNotification and Network Link Conditioner in Swift

From iOS 12 you simply use NWPathMonitor which is a line of code (example). For historic purposes: I'm trying to integrate …

ios swift nsnotificationcenter reachability
How do you create custom notifications in Swift 3?

In Objective-C, a custom notification is just a plain NSString, but it's not obvious in the WWDC version of Swift 3 …

swift nsnotificationcenter nsnotifications nsnotification swift3
iOS Remove observer from notification: Can I call this once for all observers? And even if there are none?

I'm registering three observers in most of my view controllers. Some have more, some less but I want to include …

ios objective-c nsnotificationcenter
How to write Keyboard notifications in Swift 3

I'm trying to update this code to swift 3: NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillShow:"), name: UIKeyboardWillShowNotification, object: nil) NSNotificationCenter.…

ios swift swift3 nsnotificationcenter