Questions tagged [addobserver]
64 questions
0
votes
1 answer
Observer for reachability in AppDelegate cannot be triggered
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
[[NSNotificationCenter defaultCenter] addObserver:self
…

Shing
- 1,255
- 1
- 10
- 18
-2
votes
2 answers
In ios how to add an observer to a method?
I'm using a plugin,there is a method "A" in the plugin's pluginClass.
if "A" is called ,I want to call "B" in myCalss.Such as:
-(void)A{
[myClass B];
}
But I don't want to modify the code in pluginClass.
Is there any way to add an observer to a…

Pikachuode
- 1
- 1
-2
votes
1 answer
why adding an oberver to remove it right after
I recently looked into some swift code and I found this: adding the observer and then removing it right after. What's the logic behind that?
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
…

Jonathan Meguira
- 1,860
- 2
- 12
- 15