Skip to content

Instantly share code, notes, and snippets.

@hacksoldier
Created November 28, 2013 22:13
Show Gist options
  • Save hacksoldier/7698779 to your computer and use it in GitHub Desktop.
Save hacksoldier/7698779 to your computer and use it in GitHub Desktop.
Prepare For Segue
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"showDetail"]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
NSManagedObject *object = [[self fetchedResultsController] objectAtIndexPath:indexPath];
[[segue destinationViewController] setDetailItem:object];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment