【问题标题】:Loading a different storyboard depending if the conditions are met根据条件是否满足加载不同的故事板
【发布时间】:2012-10-05 16:50:52
【问题描述】:

就像设置一个代码来检测 iPhone 的分辨率并根据它的分辨率加载某个视图控制器。

CGRect screenBounds = [[UIScreen mainScreen] bounds];
if (screenBounds.size.height == 568) {
    // load ViewContollerA 
} else {
    // load ViewContollerB
}

如何设置代码来加载故事板?谢谢。

我认为它可能必须连接到 IBAction,这样当您按下按钮时,它会验证分辨率是什么,并根据它加载下一个情节提要(A 或 B)。

【问题讨论】:

  • 你可能会发现一些提示here,它是关于防止segue,但也可以用于选择一个。

标签: iphone ios xcode cocoa-touch


【解决方案1】:

几天前我回答了这个问题。这里

How to switch to different Storyboard for iPhone 5?

希望有帮助...

【讨论】:

    猜你喜欢
    • 2014-03-30
    • 1970-01-01
    • 2013-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多