Xcode 6 Bug:Interface Builder文件中的未知类 [英] Xcode 6 Bug: Unknown class in Interface Builder file

查看:112
本文介绍了Xcode 6 Bug:Interface Builder文件中的未知类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已升级到Xcode 6 beta 4,现在我的应用程序不断崩溃消息

I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message


Interface Builder文件中的未知类X. / p>

Unknown class X in Interface Builder file.

它崩溃了,因为据说Xcode找不到我在Storyboard中链接的自定义类,但它显示它们在Xcode界面。

It crashes because supposedly Xcode can't find my custom classes that I have linked in my Storyboard but it shows that they are linked correctly in the Xcode interface.

我很肯定所有内容都正确链接。我唯一的另一个选择可能是删除整个故事板文件并从头开始,因为它可能会以某种方式损坏。

I'm positive everything is linked correctly. My only other option may be to delete the entire storyboard file and start from scratch because it might be corrupted somehow.

编辑:我还想补充说我试过清理,重置模拟器,弄乱构建阶段等。这一切都不起作用。

I would also like to add that I tried cleaning, reseting simulator, messing with build phases etc. None of that works.

推荐答案

我在输入问题时解决了这个问题。我想我会回答我的问题,并将其留给任何可能在使用Xcode 6 beta 4时遇到此问题的人。

I resolved this issue as I was typing the question. I figured I'd answer my question and leave it here for anyone else who may face this issue when using Xcode 6 beta 4.

要解决此问题,您需要在Storyboard中选择每个自定义类对象(这包括任何自定义视图,甚至是自定义视图控制器本身)。

To resolve this issue, you need to select each of your custom class objects in Storyboard (this includes any custom views, even the custom view controllers themselves).

然后选择这些对象,打开身份检查器,在自定义类下,您应该看到模块选项。在模块文本框内单击,然后按Enter键。

Then with those objects selected, open the identity inspector and under "Custom Class" you should see the Module option. Click inside the Module text box, and press enter.

就是这样!我的所有自定义对象的当前模块必须在Xcode 6 beta 4中以某种方式在内部错误设置。但是在检查器中没有这种可视指示。

That's it! The current module for all of my custom objects must have been internally incorrectly set somehow in Xcode 6 beta 4. But there was no visual indication of this in the inspector.

注意如果在模块文本框内按Enter键不起作用,请尝试选择右侧的箭头并手动选择当前模块,然后清除文本框并按Enter键。你也可以尝试在课堂文本框中按Enter键(虽然这通常是为了解决另一个问题)。

Note that if pressing enter inside the Module text box doesn't work, try selecting the arrow to the right and manually select your current module, then clear the text box and press enter. You can also try pressing enter inside the class text box (although this usually is to resolve a different issue).

这是一张让事情更清晰的图片:

Here is an image to make things more clear:

这篇关于Xcode 6 Bug:Interface Builder文件中的未知类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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