Top "Nsnotificationcenter" questions

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

How to pass a NSDictionary with postNotificationName:object:

I am trying to pass an NSDictionary form a UIView to a UIViewController using NSNotificationCenter. The dictionary works fine at …

iphone xcode nsdictionary nsnotificationcenter
How to receive NSNotifications from UIWebView embedded YouTube video playback

I didn't received any notifications for MPMoviePlayerController. What am I doing wrong? I use following logic. I'm begining to play …

ios youtube mpmovieplayercontroller nsnotificationcenter mpmovieplayer
Swift 4 - Notification Center addObserver issue

I'm crashing and getting an unrecognized selector error every time a Notification arrives and the App tries to execute its …

swift nsnotificationcenter xcode9 addobserver
NSNotificationCenter Swift 3.0 on keyboard show and hide

I am trying to run a function when the keyboard shows and disappears and have the following code: let notificationCenter = …

ios swift keyboard-events nsnotificationcenter
iOS/iPhone Reachability - How to only check when internet is lost/not reachable using Reachability.m/.h

Currently i am using the class by apple reachability.m/.h and it works, except it notifies me for any …

ios iphone objective-c nsnotificationcenter reachability
Posting NSNotification on the main thread

I found the following code snippet which allows NSNotification to be posted on the main thread from any background thread. …

ios objective-c cocoa nsnotificationcenter
iOS NSNotificationCenter to check whether the app came from background to foreground

I have a situation in which i have to intialize an object everytime when it comes from background to foreground …

ios background nsnotificationcenter foreground
Type 'NSNotification.Name' has no member 'keyboardDidShowNotification'

I'm getting this error with Swift 4.2 Type 'NSNotification.Name' has no member 'keyboardDidShowNotification' Here is my code: NotificationCenter.default.addObserver(…

ios keyboard-events nsnotificationcenter swift4.2
NSNotification not being sent when postNotificationName: called

I'm trying to get one instance of using NSNotificationCenter with addObserver and postNotificationName but I can't work out why it …

iphone objective-c nsnotificationcenter
Instance was deallocated while key value observers were still registered with it

I've got a UITableView. Here I got different cell's. Each cell has a model. With KVO and NotificationCenter the cell …

ios objective-c nsnotificationcenter