【发布时间】:2012-08-25 07:49:25
【问题描述】:
我正在尝试使用下图中显示的代码 sn-p 实例化 MainStoryBoard.storyboard 中定义的 ViewController。我还为控制器分配了一个标识符,但应用程序崩溃了,图片中显示的错误是“Storyboard 不包含具有标识符 masterViewController 的控制器”,尽管您可以在图片中清楚地看到它在那里。 任何帮助将不胜感激。
请注意,以下解决方案对我不起作用:Crash with instantiateViewControllerWithIdentifier
以下是确认情节提要对象与从视图控制器检索并用于实例化ViewControllerWithIdentifer: 相同的快照。 情况描述:我正在尝试开发一个自定义的 SplitViewController(从 UIViewController 继承)。这个 UIViewController 是纯程序化的,即不基于 IBInterface 布局。然而,对于它的孩子,即 MasterViewController 和 DetailViewController,我已经在 IBInterface 中进行了布局。现在,我在 SplitViewController 中检索一个 UIStoryboard 对象(纯程序化对象),并将其传递给第一张图片中显示的实用程序类,该类使用它基于 Storyboard 中的布局实例化 MasterViewController。
【问题讨论】:
标签: ios5 uiviewcontroller uistoryboard