Kutay Demireren
Kutay Demireren

Reputation: 650

How to connect two view controller to one view controller using Storyboard?

I'm trying to connect two view controller into a one controller. As you can see below picture, when "plus" item is tapped the screen came and it works well. However, the other segue doesn't work properly. With my first tapping to any row, it doesn't take me to the view but after first tapping it starts taking me to the view as I wanted. I couldn't figure out why it doesn't take me to when I firstly tap any row. Here is the didSelectRowAtIndexPath code:

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{
    DovizDetailViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"detail"];
    [self.navigationController pushViewController:detail animated:YES];
}

Below is my storyboard. The problem is about with the above view and it's segue.

Two view connected to one

Hope you can help me.

Thanks!

Upvotes: 2

Views: 445

Answers (1)

Doro
Doro

Reputation: 2413

Change didDeselectRowAtIndexPath to didSelectRowAtIndexPath

Upvotes: 4

Related Questions