I would like to “pause” my app when the iPad receives notifications, like push notifications from other apps, local notifications like alarms and so on, that is showing a small pop up window. I have tried to look for what event to listen to but can not find it.
I have implemented this in my view controller for applicationWillResignActive and hope there is something similar for this kind of notifications.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(pauseMyApp:)
name:UIApplicationWillResignActiveNotification
object:nil];
I’m sure that I have read about it somewhere but can not recall. Would appreciate if someone can redirect me to the right documentation or just give a short piece of code.
Thanks in advance.
I must seem stupid to have asked this question, as the answer is the same as I already is using 🙂 Just implement the applicationWillResignActive. Documentation can be found here for those (like me!) who has a problem finding it again…
UIApplicationDelegate Protocol Reference