简体   繁体   English

从表格视图中选择时,在多个详细信息视图之间进行排序

[英]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. 我正在使用Swift和UISplitView的Xcode 6。 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. 在Xcode 5中,我能够从原型单元中拖动多个segue,并使用performSegueWithIdentifier。 In Xcode 6, I can only have one segue coming from my prototype cell. 在Xcode 6中,我只能从原型单元中获取一个序列。

What's the best way to go about this? 最好的方法是什么?

One type of cell, one segue. 一种细胞,一种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. 从单元格选择方法调用segue时,可以在sender对象中附加必要的行对象信息。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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