如何在另一个故事板中添加故事板引用 [英] How to add storyboard reference in another storyboard
问题描述
我有2个故事板 - mainStoryBoard1
和 mainStoryBoard2
。
I have 2 storyboard - mainStoryBoard1
and mainStoryBoard2
.
我需要执行一个segue,从 ViewController of mainStoryBoard1
到 ViewController of mainStoryBoard2。 / code>
I need to perform a segue from ViewController of mainStoryBoard1
to ViewController of mainStoryBoard2.
任何人都知道怎么做?
推荐答案
Xcode 7中的Interface Builder在对象库中有Storyboard Reference对象:
Interface Builder in Xcode 7 has "Storyboard Reference" object in the "Object library":
只需将其拖到故事板上即可。然后,您可以选择该故事板参考并在属性检查器中指定它所引用的故事板:
Just drag that onto your storyboard. You can then select that storyboard reference and specify the storyboard to which it refers in the attributes inspector:
然后,您现在可以将segue添加到此引用中,您将从一个故事板中的场景转移到另一个故事板中的场景。
Then you can now add segue to this reference and you'll segue from the scene in one storyboard to a scene in another storyboard.
这篇关于如何在另一个故事板中添加故事板引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!