nsnotification Questions
5
I am trying to move a UITextView above the keyboard whenever the keyboard appears/changes. Let's say I have the English keyboard displaying and then switch directly to the Chinese keyboard (which i...
Shangrila asked 23/12, 2014 at 5:56
8
Solved
How do I check if an UIViewController is currently being displayed?
My UIViewControllers are listening for NSNotifications - even if when they are not displayed (ie not shown). So I could have 10 ...
Bonaire asked 9/10, 2012 at 20:29
13
Solved
In Objective-C, a custom notification is just a plain NSString, but it's not obvious in the WWDC version of Swift 3 just what it should be.
Colobus asked 18/6, 2016 at 17:28
2
Solved
I call rest web servic with completion handler and if succeed I send NSNotification.
The problem is how to write unit test to assert that the notification is sent in case of success.
Any help wil...
Jasonjasper asked 19/12, 2015 at 13:31
3
Solved
I have a UIView similar to the one you can see below:
class ViewTaskViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
override func viewDidLoad() {
super.viewDidLoad(...
Ominous asked 12/5, 2017 at 11:5
3
Solved
I am displaying a text as soon as a video is done playing. I am using a notification technique to achieve that. The only problem is that the Observer is called twice every now and then. It triggers...
Spoor asked 27/4, 2013 at 4:51
2
I would like to call a method that takes an NSNotification immediately after the user presses the camera shutter (i.e when the "Preview" tab bar has the buttons "Retake" and "Use").
I can't use t...
Infecund asked 4/2, 2010 at 6:14
2
I am using MPMoviePlayerController, how do I detect when the movie actually started playing - as opposed to when the user fiddles with the seek controls?
From the tests I made, I always get a "lo...
Polly asked 1/10, 2013 at 11:47
4
Solved
I am trying to subclass NSNotification.
Apple's docs for NSNotificationstate the following:
NSNotification is a class cluster with no instance variables. As such,
you must subclass NSNotificat...
Quartis asked 27/9, 2011 at 15:53
1
Solved
Due to NSNotificationCenter.defaultCenter().postNotificationName userinfo only accepting dictionaries with data complying with AnyObject protocol, does anyone have any suggestions how to post struc...
Incorruptible asked 2/3, 2015 at 11:37
2
Solved
I'm wondering if there is a reason to use one over the other in KVO vs NSNotificationCenter observations. Performance, memory usage, speed, etc?
Musical asked 20/9, 2011 at 1:15
3
Solved
What's difference between NSNotification's object and userInfo?
When I post a notification with a parameter, I can use object or userInfos to do it. But I do not know what the difference is betwee...
Othilie asked 16/2, 2015 at 10:2
1
Solved
Considering the new QuickType section of the keyboard.
Is it quite true that one can use ONLY a notification for UIKeyboardWillChangeFrameNotification,
and simply "not bother with" the "older" UI...
Primateship asked 11/10, 2014 at 16:9
3
Basically, I have a view1 which at some point, calls view2 (via presentModalViewController:animated:). When a certain UIButton in view2 is pressed, view2 is calls a notification method in view1 and...
Parenthesize asked 25/7, 2010 at 5:50
1
In my UITableViewCell I have a method initNotification which is called by the TableViewController in cellForRowAtIndexPath where the TableCells are created.
My Problem is that, every time this vie...
Imray asked 12/7, 2013 at 6:25
2
Solved
I saw a few examples about adding observer and handle in the same class, but what I want to know is if it's possible to add observer in first view controller and handle it in second view cont...
Ostensible asked 13/6, 2013 at 6:30
2
Solved
The golden rule of using NSNotification seems to be
"call removeObserver before the observer (or the object) is deallocated".
I'm dealing with a codebase where this rule hasn't been followed...
Hereabouts asked 19/2, 2012 at 8:31
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
I may not have worded my title very well, maybe more correct to say my NSNotification isn't dismissing my movie's view after it's done playing. I've found others with this problem but no solutions,...
Cholecyst asked 8/10, 2012 at 17:35
3
Solved
Can anybody explain the importance of NSNotificationCenter?
Where to use them?
What is the difference between NSNotificationCenter vs. AppDelegate?
Sterigma asked 14/12, 2009 at 11:25
2
Solved
I am registering an observer on a bunch of tableview controllers dynamically so I need to remove previous observers if they were registered on the same object. To do this I need to check if the obs...
Favourite asked 21/5, 2012 at 11:15
2
Solved
I would like to log any NSNotifications posted by a single NSNotificationCenter shared accross my application. I have tried subclassing NSNotificationCenter with the intention of adding logging cod...
Crosswind asked 17/4, 2012 at 15:7
4
Solved
I usually use NSNotification like the sample below:
In viewDidLoad:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(foo:) name:kName1 object:nil];
[[NSNotificationCenter...
Misplay asked 6/4, 2012 at 6:14
1
Solved
I have a UITextField with this NSNotification:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:@"UITextFieldTextDidChangeNotification" object:_s...
Iridectomy asked 31/3, 2012 at 9:41
3
Solved
So i have an app with an In App purchase. The In App purchase is managed in FirstViewController. When the user has purchased the product, i want to send out a Notification to my MainTableViewContro...
Lawn asked 25/7, 2011 at 11:24
1 Next >
© 2022 - 2024 — McMap. All rights reserved.