简体   繁体   中英

Load view into navigation view controller when table cell is pressed

I have an iOS app which is using storyboard (and ARC for that matter). Now in that app i have a tab view, where one of the tabs leads to a table view found within a UINavigationController. Up to this point, loading views was 100% handled by segues in the storyboard. Now in the table view, I have some cells which I create programatically, and i want them to lead to a different view (which will also be in the UINavigationController). Now they always lead to the SAME view, just pass different information when pressed (that i have already taken care of). The thing is, I can't menage to do it in the storyboard, because the cells are created programatically...

So is there a way to do this using storyboard? If not, how may I accomplish this programatically?

A picture is attached to make the organisation of the storyboard clearer. 在此处输入图片说明

Thankyou for any support!

Create a push-style segue in the storyboard between the two controllers and give it a name. When the user selects a cell, use performSegueWithIdentifier:sender: to trigger the transition.

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