ios - 如何在不同的 Storyboard 中对导航堆栈中的某些 View Controller 执行推送 segue?

标签 ios swift uinavigationcontroller segue uistoryboard

我想执行 push segue(所以我可以在左上角有后退按钮),从 main.storyboard 到我的另一个 Storyboard(第二个 Storyboard)。

enter image description here

我想从 main.storyboard 中的红色 View Controller 执行 push segue 到 second.storyboard 中的第二个(编号 2) View Controller

从这里(main.storyboard): enter image description here

到这里 no.2(second.storyboard): enter image description here

我可以吗?我该怎么办?

最佳答案

为你要推送的ViewController创建一个引用id

在第二个 Storyboard中

在界面生成器上选择ViewController

为其分配“ Storyboard ID”(例如 SecondVC)

回到主 Storyboard

选择“second” Storyboard的 Storyboard引用,并在“Referenced ID”字段中添加 VC id (SecondVC)

关于ios - 如何在不同的 Storyboard 中对导航堆栈中的某些 View Controller 执行推送 segue?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50900606/

相关文章:

iphone - 如何在iPhone应用程序中根据用户登录显示按钮

ios - 从应用委托(delegate)调用实例函数

ios - UISearchController 搜索栏不隐藏导航栏

ios - 每次释放 UIScrollView 时内存泄漏

swift - SKAction.move(to : . ..) 和 SKAction.move(by : . ..) 对我来说完全一样

iOS - 通过本地推送通知触发通知服务扩展?

ios - 为 UITextField 弹出键盘时 UIView 消失

ios - 创建新文件时,XCode 不会在下拉列表中显示所有子类

ios - UINavigationController 中的 UIScrollView 中的 UIViewController 想要推送新的 Controller

ios - Swift 中的协议(protocol)是引用类型还是值类型?