Last active
October 13, 2016 16:58
-
-
Save mluton/e2f109883a0eadd77459adc1438e1bbe to your computer and use it in GitHub Desktop.
Respond to app background/foreground notifications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidBecomeActiveNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidEnterBackgroundNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillResignActiveNotification object:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment