I am having a table view with titles in each row.
Now i need when i click on the row it should take me to the next view (detail view).
I have connected the row and the new view with segue “Information Detail Segue”.
Now here is the code:
if ([segue.identifier isEqualToString:@"Information Detail Segue"]) {
InformationDetailTVC *informationdetailTVC = segue.destinationViewController;
informationdetailTVC.managedObjectContext = self.managedObjectContext;
informationdetailTVC.delegate = self;
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
self.selectedInformation = [self.fetchedResultsController objectAtIndexPath:indexPath];
NSLog(@"Passing selected role (%@) to RoleDetailTVC", self.selectedInformation.title);
informationdetailTVC.information = self.selectedInformation;
}
But when i am running, and clicking on the cell, the control doesn’t go to this loop. Infact when i click the cell, it just becomes blue and doesn’t load the new view.
Can any one tell me what am i missing?
try implementing:
don’t forget to set your delegate and datasource (usually on the xib file)