我需要在启动时在 AppDelegate 中做出一系列决定 - 根据这些决定的结果,我需要转到 Storyboard的特定部分。
所以我的问题是 - 在不使用任何导航或选项卡 Controller 的情况下,如何转到 Storyboard的特定部分?
或
唯一受支持的选项是否具有多个 Storyboard - 针对每个“结果”然后根据需要加载它们?
谢谢
最佳答案
在 Storyboard中为每个 ViewController 提供一个唯一标识符。 然后在 appDelegate 中:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"PUT_UNIQUE_ID_HERE"];
//DO WHAT YOU WANT WITH YOUR VIEWCONTROLLER
//Example:Set it as the root view of the app window...
关于ios - Storyboard的多个入口点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8872215/