即使接口生成器是一个MyClass,我得到一个错误时启动应用程序。
当MyClass是库的一部分时,就会发生这种情况,如果直接在应用程序目标中编译该类则不会发生这种情况。
即使接口生成器是一个MyClass,我得到一个错误时启动应用程序。
当MyClass是库的一部分时,就会发生这种情况,如果直接在应用程序目标中编译该类则不会发生这种情况。
当前回答
这里有很多答案,但没有一个是解决方案, 我追踪到storyBoard,控制器有一个无效的自定义类(类不存在后,我重命名它)
其他回答
我今天使用Swift确实遇到了这个问题。
我修改了一个类Model.h + Model。m to a Model.swift。 该对象在Interface Builder中使用class = Model。
一旦我替换了对象,类就不能再加载了。
我所要做的就是把IB的课程参考改为:
Class = Model
Module =
to
Class = Model
Module = <TARGETNAME>
您将在构建设置中找到<TARGETNAME>。它也是在你生成的Swift-Header中出现的名称:
我今天在Xcode 4下将我的aaLuminate应用程序转换为Universal时出现了这个错误。 这个应用程序基于实用工具模板,最初是在Xcode 3下构建的。
为了节省时间,我将iPhone主视图和Flipside视图复制到Universal应用程序上的适当名称。我遇到了“Interface Builder file中未知类x”错误。在我的案例中,XIB文件或目标中没有任何内容。
我还复制了aaLuminate-Info。plist文件跨越其他原因-这有一个旧的关键“主nib文件基名”设置为MainWindow。
只要我删除这个关键它修复了问题!
在我的情况下,我得到这个错误消息由一个非常愚蠢的错误由我:在接口构建器上,我想设置一个UITableViewCell的标识符,但我意外地键入标识符到'自定义类'的接口构建器条目。
我在....之前制造了1000次细胞
在我的例子中,自定义UIView类是在一个嵌入式框架中。我将自定义的UIView头文件“project”改为“public”,并将其包含在主头文件中。
I tried most of the solutions you guys suggested above but to no avail. After reading the solution from user776904's I suspected I was having the same issue as I had rebuilt my app from the ground up but copied the xib files from the previous project. I suspected the xib file had a reference to the old project that was causing my error so I simply deleted my mainwindow_ipad.xib file and copied in a new one from a clean new project. This solved it. And I was not game enough to start changing bits of the xib file in its source code.