Interface Builder文件中的未知类**** [英] Unknown Class **** in Interface Builder file

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

问题描述

我使用MyView的根类添加了UIView xib文件.

I added a UIView xib file using the root class of MyView.

我在错误的位置创建了它,因此将其移到了项目中.同一项目只是一个不同的文件夹/组.

I created it in the wrong place and so moved it in the project. Same project just a different folder/group.

然后我说...时遇到了问题.

I then had a problem when running saying...

Unknown Class MyView in Interface Builder file

我无法弄清楚出了什么问题,所以现在我已经从项目和目录中删除了文件.

I couldn't work out what was wrong so I have now deleted the files both from the project and from the directory.

我已经使用SublimeText2搜索了字符串"MyView",它在项目中不存在.

I've done a search using SublimeText2 for the string "MyView" and it doesn't exist anywhere in the project.

我已经重置了模拟器,清理了项目和build文件夹,并删除了衍生数据.

I've reset the simulator, cleaned the project and the build folder and deleted derived data.

仍然出现相同的错误.

有什么想法我现在能做什么?

Any ideas what I can do now?

推荐答案

好,所以我删除了引起该问题的所有对该类的引用,但还是没有.

OK, so I deleted all references to the class causing the problem but still nothing.

但是,我还有一个名为MyViewController的UIViewController子类.该文件未加载到任何IB文件中,所以我不知道它是怎么引起问题的.

However, I also had a UIViewController subclass called MyViewController. This wasn't being loaded in any IB file so I don't know how it was causing the problem.

我将名称更改为MyOtherViewController.

构建-运行-可以运行.

Build - Run - works.

我不知道如何或为什么,但现在可以正常工作.

I don't know how or why but it works now.

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

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