简体   繁体   中英

Segue between multiple detail views when selecting from tableview

Ok, I haven't been able to find a definitive answer to this. I'm on Xcode 6 working with Swift and a UISplitView. I have multiple detail views in storyboard and I want to be able to replace my detail view with another when selecting from a tableview. In Xcode 5, I was able to drag multiple segues from my prototype cell and use performSegueWithIdentifier. In Xcode 6, I can only have one segue coming from my prototype cell.

What's the best way to go about this?

One type of cell, one segue. This seems to be a logical and useful system constraint.

One solution is to just create more cell types with different cell identifiers.

Alternatively, if you have another way to determine which segue to use, draw all segues from the view controller instead of the cell. You can attach the necessary row object information in the sender object when calling the segue from the cell selection method.

您可以从ViewController中创建任意数量的Segue,并在IB中为每个Seuge提供不同的Segue标识符,并使用performSegueWithIdentifer方法调用每个

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