Skip to content

Instantly share code, notes, and snippets.

@schultyy
Last active January 1, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schultyy/8176412 to your computer and use it in GitHub Desktop.
Save schultyy/8176412 to your computer and use it in GitHub Desktop.
MasterController sends `ShowMessageDetail` message when user double clicks on row in table view
-(void) tableViewDoubleClick: (id) sender{
NSManagedObject *message = [[[self arrayController] arrangedObjects] objectAtIndex: [sender selectedRow]];
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:message forKey:@"message"];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc postNotificationName:@"ShowMessageDetail" object:nil userInfo:userInfo];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment