Created
September 14, 2015 06:38
-
-
Save phynet/a34c2bc207e6050f43ca to your computer and use it in GitHub Desktop.
Using NSNotification to update data
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
__typeof__(self) __weak wself = self; | |
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillEnterForegroundNotification object:nil queue:nil usingBlock:^(NSNotification *note) { | |
[wself updateData]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment