Xcode 7 beta 3 故事板错误 [英] Xcode 7 beta 3 Storyboard bug

查看:31
本文介绍了Xcode 7 beta 3 故事板错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在不使用 StoryBoard 的情况下制作应用程序.我正在从 AppDelegate 实例化我的根视图控制器 当我运行我的应用程序时,我得到以下 SIGABRT.

I am attempting to make an app without using StoryBoard. I am instantiating my root view controller from the AppDelegate When I run my app I get the following 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:

当我打开 main.storyboard 文件时,我没有在属性检查器中找到任何标记为是初始视图控制器"的 UIViewController.但是当我选择视图控制器作为初始视图控制器时,应用程序运行良好.这是 xcode 7 beta 中的错误吗?

When I open my main.storyboard file I don't have any UIViewController marked as "Is Initial View Controller" found in the Attributed inspector. 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 中目标设置的主界面"部分中删除对故事板文件的引用.如果该部分中仍引用故事板,则启动代码将尝试实例化您的初始场景,即使您打算将其替换为您自己的视图.

You need to remove the reference to your storyboard file from the "Main Interface" section of your target's settings in 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.

如果您的故事板不包含初始场景,那么您会得到一个例外.这种行为在 iOS 9 中并不新鲜.

If your storyboard doesn't contain an initial scene then you get an exception. This behaviour is not new to iOS 9.

这篇关于Xcode 7 beta 3 故事板错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆