Last active
August 29, 2015 14:06
-
-
Save sstadelman/0451d473cb20b9d64995 to your computer and use it in GitHub Desktop.
Add listeners in viewWillAppear
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
- (void)viewWillAppear:(BOOL)animated { | |
[[Model shared] addObserver:self | |
forKeyPath:@"travelAgencies" | |
options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) | |
context:NULL]; | |
} | |
- (void)viewWillDisappear:(BOOL)animated { | |
[[Model shared] removeObserver:self | |
forKeyPath:@"travelAgencies"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment