-
-
Save romyilano/8091068 to your computer and use it in GitHub Desktop.
Damn, always forget this one. the selected table row for is the indexPathForSelectedRow:
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)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