Skip to content

Instantly share code, notes, and snippets.

@sstadelman
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save sstadelman/bf2b4b16ab2af63f400e to your computer and use it in GitHub Desktop.

Select an option

Save sstadelman/bf2b4b16ab2af63f400e to your computer and use it in GitHub Desktop.
observeValuesForKeyPath
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if (!object) return;
if ([keyPath isEqualToString:@"travelAgencies"]) {
NSLog(@"updated to x = %@", [[Model shared].travelAgencies description]);
[self.tableView reloadData];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment