nsnotifications Questions
2
Solved
Are the new notifications not currently working in Swift 3?
I am doing:
NotificationCenter.default().post(name: DidTouchParticleView, object: self.particle as? AnyObject)
In a custom view's to...
Enosis asked 11/7, 2016 at 14:55
1
Solved
How can I listen for an event when a user opens the app switcher (the UI that comes up when a user double taps on the home button) on iOS.
I though UIApplicationDidEnterBackgroundNotification woul...
Amitosis asked 27/6, 2016 at 21:48
3
Solved
I have a view with keyboard notifications such as keyboardWillShow and keyboardWillHide
All the codes handles with the notification I use is taken from Apple's sample code "KeyboardAccessory"
Whe...
Beverleebeverley asked 10/11, 2011 at 16:4
2
Solved
I am trying to pass an object from my main view class to other notification receiver in another class.
I want to pass an object named country, that loads all the cities from an SOAP Request in the...
Krupp asked 22/11, 2011 at 20:31
4
Solved
When receiving a remote push notification as the application is in the background, the app enters applicationDidBecomeActive. From there, how can I access the NSDictionary of data from the notifica...
Impulsion asked 18/7, 2011 at 11:48
0
In my iOS app I want to know when the control or the notification center appears. Is there a notification specifically for this available? The notifications for applicationWillResignActive and appl...
Sulphur asked 15/4, 2015 at 8:19
4
Solved
Would like to have your opinion regarding the following architecture:
In My app I have a static class (LoginManager) that handles an asynchronous login. Once the login phase is completed the app s...
Jerrold asked 25/12, 2014 at 12:7
4
Solved
I am developing an app that fetches data from the web and displays it to the user. Assume that the data is reviews of a restaurant and one review is displayed on one view. The user can swipe left o...
Colene asked 25/2, 2014 at 6:27
3
Solved
I'd like to pass dict to the method processit. But once I access the dictionary, I get EXC__BAD_INSTRUCTION.
NSNotificationCenter *ncObserver = [NSNotificationCenter defaultCenter];
[ncObserver a...
Floss asked 23/6, 2009 at 21:18
3
I got a Cocoa command-line program in which I try to run NSTask program (tshark to monitor network) and get data from it in real-time. So I make a
NSFileHandle
, call waitForDataInBackgroundAndNo...
Dollydolman asked 20/1, 2012 at 17:57
3
Solved
This isn't a question so much as a warning to others to save them some time.
NSNotificationCenter on iOS 3/iPhone OS 3 (I'm assuming also Mac OS X and iOS 4) has the following behavior:
If you re...
Accuracy asked 18/6, 2010 at 20:22
1
Solved
Hello,
I am writing an app that should respond with an UI update and an internal status change when a local notifcation is used to open it. I am using storyboards and I have set up my main view c...
Rizo asked 10/2, 2013 at 19:48
3
Solved
I am detecting the showing/hiding of the keyboard by adding this code in the ViewDidLoad:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidHide:)
name:UIKey...
Remittee asked 2/2, 2013 at 13:23
1
Solved
I have a custom NSWindow class that has the following methods:
- (void)setupWindowForEvents{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResignKey:) name:NS...
Alternative asked 31/12, 2012 at 0:45
2
Solved
I have a solution for a notification problem which works well, but I'm afraid might be a bad idea.
I have a notification that needs to be handled by each instance of a class and by the class itsel...
Smegma asked 6/12, 2012 at 15:58
1
Solved
What is the difference between windowDidBecomeKey: and windowDidBecomeMain: notifications?
In other words, I want to know that "what is the key window" and "what is the main window".
Stramonium asked 4/12, 2012 at 7:13
1
Probably a simple question - can an iOS app continue to receive media player notifications [NSNotifications] (i.e. MPMusicPlayerControllerNowPlayingItemDidChangeNotification) once it moves into bac...
Tesler asked 20/11, 2012 at 23:19
1
Solved
In relation to this question I was wondering if there is any generally accepted logic regarding when to use NSNotification, with an observer in your main thread, vs using GCD to dispatch work from ...
Darwinism asked 20/11, 2012 at 20:39
3
Solved
I am aware of the standard reasons as to why a notification would not be received:
Deallocating or nullifying the registered object.
Removing the object as an observer.
Not registering as an obse...
Induce asked 15/11, 2012 at 13:38
3
Solved
I have a tabBarController set up in the AppDelegate and have a few UIViewControllers with Nav Controllers. In one of the TabBar items, after I have pushed a few UIViews I want to update the badgeVa...
Cushy asked 18/5, 2010 at 3:18
3
I have an iOS 5 ARC-based project, and am having difficulty about where I should be removing the observer for the NSNotificationCenter observations which I have registered within a UIViewController...
Recrement asked 4/12, 2011 at 2:42
1
I just want to know if its possible to get a notification when the playback control gets visible or hidden?
For example, I want to present a video with the style:
self.moviePlayerController.contr...
Corrade asked 19/7, 2012 at 12:19
2
Solved
I'm trying to get a notification from a MPMoviePlayerController when the movie has reached its end. I'm running the player in embedded mode with a local file.
Like the docs suggest, I registered f...
Philous asked 15/11, 2011 at 15:19
1
Solved
In the AppDelegate's didFinishLaunchingWithOptions:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(contextChanged:)
name:NSManagedObjectContextDidSaveNotification
ob...
Sphenogram asked 5/3, 2012 at 0:55
2
Solved
I'm confused on why the observer is never removed in the following code. In my viewDidAppear I have the following:
-(void)viewDidAppear:(BOOL)animated{
id gpsObserver = [[NSNotificationCenter def...
Chaisson asked 12/12, 2011 at 16:41
© 2022 - 2024 — McMap. All rights reserved.