NSNotificationsで行うことができます。 MasterViewControllerのあなたのviewDidLoadで
#define ReloadMasterTableNotification @"ReloadMasterTableNotification"
:MasterViewControllerののdeallocで
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadMasterTable:) name:ReloadMasterTableNotification object:_detailViewController];
あなたはARC使用している場合:あなたが通知するdetailViewControllerであなたの更新をしたい場合は
[[NSNotificationCenter defaultCenter] removeObserver:self name:ReloadMasterTableNotification object:nil];
をMasterViewController:
- (IBAction)onButtonPress {
NSIndexPath *path = [NSIndexPath indexPathForRow:indexToUpdate inSection:0];
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:path, @"IndexPath", nil];
[[NSNotificationCenter defaultCenter] postNotificationName:ReloadMasterTableNotification object:self userInfo:dict];
}
- (void)reloadMasterTable:(NSNotification *)notification {
NSDictionary *dict = [notification userInfo];
NSIndexPath *path = [dict objectForKey:@"IndexPath"];
// update MasterViewController here
}
希望に役立ちます!