简体   繁体   中英

Dynamically Change Detail View Controller

I have a Split View controller set up in Storyboard, and I need to be able to change the Detail View Controller dynamically. By default, the Detail View Controller has a "relationship" segue to a Navigation Controller, which leads to the original Detail View Controller. How can I dynamically change this relationship to another controller?

You can do this a couple different ways. If you want to do it all in storyboard, you can create a segue from your master view controller buttons or cells to your detail view Controller and choose the "replace" segue option. You can also do this in code where your master view controller stores a reference to the detail view controller (UINavigationController) and replace out the root view controller.

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