如何在另一个故事板中添加故事板引用 [英] How to add storyboard reference in another storyboard

查看:90
本文介绍了如何在另一个故事板中添加故事板引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆