简体   繁体   English

通过界面构建​​器查看另一个故事板

[英]Segue to another storyboard via interface builder

如何在一个故事板中的视图控制器和另一个故事板中的视图控制器之间创建segue?

Earlier it was not possible without code, but since Xcode 7, Apple has given us a powerful tool - Storyboard References . 早些时候没有代码是不可能的,但是从Xcode 7开始,Apple给了我们一个强大的工具 - Storyboard References

What you need to do is to drag and drop this element to your initiating storyboard: 您需要做的是将此元素拖放到启动故事板:

故事板参考

In its options you select the proper storyboard and optionally (default it uses initial view controller) set its id. 在其选项中,您可以选择正确的故事板,并可选择(默认使用初始视图控制器)设置其ID。

故事板参考选项

Now you can define segue to this view controller as normal. 现在您可以正常定义此视图控制器的segue。

Please note that only normal segues work with iOS8. 请注意,只有普通的segues才能与iOS8配合使用。 Relationship ones (like root, embed etc.) work only in iOS9. 关系(如root,embed等)仅适用于iOS9。

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

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