my app stores different attributes in Core Data objects. They are all shown in a UITableView, if you click a cell, a DetailView is shown. the usual stuff like in the Master-
If you are using storyboard segues from the cell to the new view controller, the sender is the table view cell.
So you could implement prepareForSegue: as such:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([sender isKindOfClass:[UITableViewCell class]]) {
UITableViewCell *cell = sender;
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
id viewController = segue.destinationViewController;
// Get your data object
// Pass it to the new view controller
}
}