I have UIViewController with a button, button opens a firstTableViewController -> tabViewController (with 3 tabs) -> one of the tabs has a secondTableViewController -> UIViewController.
Everything is in storyboard.
In firstTableViewController the prepareForSeque works fine. I don't even have didSelectRow...
But on secondTableViewController the prepareForSeque doesn't fire. So I added didSelectRowAtIndexPath as follows. But still the prepareForSegue doesn't work.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"ShowComment" sender:self];
}
-(void) performSegueWithIdentifier:(NSString *)identifier sender:(id)sender
{
[self prepareForSegue:self.storyboard sender:self];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//When a row is selected, the segue creates the detail view controller as the destination.
//Set the detail view controller's detail item to the item associated with the selected row.
NSLog(@"test");
if ([[segue identifier] isEqualToString:@"ShowComment"]) {
}
}