Wednesday, 18 September 2013

UIApplicationDidBecomeActiveNotification filter notifications

UIApplicationDidBecomeActiveNotification filter notifications

I registered my main view controller for listening to
UIApplicationDidBecomeActiveNotification because I want to display a
UIAlertView each time the user enters my app :
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(someMethod:)
name:UIApplicationDidBecomeActiveNotification
object:nil];
It's working like a charm, my only problem is if my app gets interrupted
(by an UIAletView, such as a calendar event, or a popup asking for picture
access confirmation), the notification gets called once the alert view's
dismissed.
Any idea on how to detect ONLY when my app comes back from background mode ?

No comments:

Post a Comment