简体   繁体   English

Xcode 7 beta 3故事板错误

[英]Xcode 7 beta 3 Storyboard bug

I am attempting to make an app without using StoryBoard. 我试图在不使用StoryBoard的情况下制作应用。 I am instantiating my root view controller from the AppDelegate When I run my app I get the following SIGABRT. 我正在从AppDelegate实例化我的根视图控制器。运行我的应用程序时,我得到以下SIGABRT。

 *** Assertion failure in -[UIStoryboard initWithBundle:storyboardFileName:identifierToNibNameMap:identifierToExternalStoryboardReferenceMap:designatedEntryPointIdentifier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3486.4/UIStoryboard.m:63
2015-07-26 18:42:54.204 NarwhalFeed[3783:2840317] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: nibNameMap != nil'
*** First throw call stack:

When I open my main.storyboard file I don't have any UIViewController marked as "Is Initial View Controller" found in the Attributed inspector. 当我打开main.storyboard文件时,在属性检查器中找不到任何标记为“是初始视图控制器”的UIViewController But when I choose the view controller as initial view controller the app runs fine. 但是,当我选择视图控制器作为初始视图控制器时,应用程序运行良好。 Is this is a bug in xcode 7 beta? 这是xcode 7 beta中的错误吗?

You need to remove the reference to your storyboard file from the "Main Interface" section of your target's settings in Xcode. 您需要从Xcode中目标设置的“主界面”部分中删除对故事板文件的引用。 If the storyboard is still referenced in that section then the start-up code will try an instantiate your initial scene even though you are going to replace it with your own view. 如果该节中仍引用情节提要,则即使您要用自己的视图替换它,启动代码也会尝试实例化您的初始场景。

If your storyboard doesn't contain an initial scene then you get an exception. 如果情节提要中不包含初始场景,则会出现异常。 This behaviour is not new to iOS 9. 此行为对于iOS 9来说并不是新的。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM