I want to pass data from TableView cell but in detailview "SongdetailView" it' s appears only the first value from table.
Here is my code
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"SongDetails"]) {
SongsDetailView *destViewController = segue.destinationViewController;
NSIndexPath *indexPath = [self.utableView indexPathForCell:sender];;
destViewController.recipeName =[ songid objectAtIndex:indexPath.row];
}
}
senderis a UITableViewCell? I would throw anNSLog(@"%@", sender);statement in there, just to make sure. - Mario