简体   繁体   中英

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.

两个视图连接到一个

Hope you can help me.

Thanks!

didDeselectRowAtIndexPath更改为didSelectRowAtIndexPath

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM