Created
September 30, 2013 15:44
-
-
Save aug2uag/6765755 to your computer and use it in GitHub Desktop.
NSNotificationCenter ApplicationDidBecomeActive
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* notificationCenter = [NSNotificationCenter defaultCenter]; | |
[notificationCenter addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { | |
NSInteger count = [APPLICATION_COUNT_VALUE integerValue]; | |
count++; | |
[self.textLabel setText:[NSString stringWithFormat:@"%i", count]]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment