故事板的多个入口点 [英] Multiple entry points to a storyboard
本文介绍了故事板的多个入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在发布时在AppDelegate中做出一系列决定 - 取决于我需要转到故事板特定部分的决策结果。
I need to make a set of decisions in the AppDelegate on launch - depending on the outcome of those decisions I need to go to specific parts of the storyboard.
所以我的问题是 - 没有使用任何导航或标签控制器,我如何去故事板的特定部分?
So my question is - WITHOUT using any nav or tab controllers, how do I go to a specific part of a storyboard?
OR
是唯一支持多个故事板的选项 - 每个'结果'然后根据需要加载?
Is the only supported option having multiple storyboards - for each of the 'outcomes' and then loading those as required?
谢谢
推荐答案
为每个ViewControllers分配一个单独的ID,然后使用以下代码实例化所需的ID:
Give each of your ViewControllers a separate ID, and then instantiate the required one with:
UIViewController *initialVC = [storyboard instantiateViewControllerWithIdentifier:@"<identifier>"];
这篇关于故事板的多个入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文