问题描述
我看到了有关该错误的其他帖子:
I saw other posts about the error:
Unknown class MyOldClass in Interface Builder file.
当我删除"MyOldClass"并为笔尖的文件所有者添加新类时,这发生在我身上.我还确保"MyOldClass"不在目标中,而我的新课程在目标中.我也尝试过Build-> Clean All Targets.我仍然收到该错误. xcode仍如何引用MyOldClass?
It happened to me when i deleted "MyOldClass" and added a new class for the nib's file owner. I also made sure 'MyOldClass' was not in the targets and my new class was. I also tried going to Build->Clean All Targets. I still get that error. How does xcode still have reference to MyOldClass?
推荐答案
Interface Builder文件只是XML,因此,如果您确定检查了文件中的每个插座和对象,则始终可以尝试使用grep
查看如果周围有参考文献:
Interface Builder files are just XML, so if you're sure you checked every outlet and object in your file, you can always try using grep
to see if there's a reference hanging around:
$ grep "MyOldClass" MyIBFile.xib
不过,我会小心地修改该文件的文本.确保必要时可以还原更改.
I'd be careful modifying the text of this file, though. Make sure you can revert your changes if necessary.
这篇关于接口生成器文件中的未知类MyOldClass的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!