When my app will enter foreground, I need to call some methods of my view controller from the app delegate class. How is the best way to realise it?
I try to create a "fake" notification in "applicationWillEnterForeground" method:
[NSNotificationCenter defaultCenter]postNotificationName:@"test" object:nil];
And add observer in view controller:
[self addObserver: self selector:@selector(testMethod) name:@"test" object:nil];
Is this OK? Another method there: Calling UIViewController method from app delegate
Which approach is better and why?
PS Sorry for my bad english.