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

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

问题描述

我创建了一个相当简单的iPhone应用程序。然后我想我会创建一个应用程序的iPad版本(Universal)。尝试使用'升级'选项,但没有解决问题。所以我创建了一个单独的通用应用程序并将xib文件复制到我的项目中。这也没有用,所以我删除了xib文件(及其相关的.m和.h文件。

I created a fairly simple iPhone app. Then figured I'd create an iPad version (Universal) of the app. Tried using the 'upgrade' option and that didn't work-out. So I created a separate universal app and copied the xib files into my project. That didn't work out either, so I deleted the xib files (and their associated .m & .h files.

现在,当我运行iPhone版本时在Interface Builder文件中给出了Unknown类iPadSample1AppDelegate。错误和UISplitViewController仅在UIUserInterfaceIdiomPad下运行时支持然后退出。所以,我恢复到我在开始iPad冒险之前拍摄的快照...我得到了同样的结果我已经尝试过XCode搜索和Spotlight搜索。在我的项目中没有任何对该类或UISplitViewController的引用,但出于某种原因,XCode认为存在。

Now, when I run the iPhone version it gives me the Unknown class iPadSample1AppDelegate in Interface Builder file. error and UISplitViewController is only supported when running under UIUserInterfaceIdiomPad and then it exits. So, I restored to the snap-shot I took before embarking on the iPad adventure... I get the same error. I've tried the XCode search and Spotlight search. There is no reference to that class or the UISplitViewController anywhere in my project, but for some reason XCode thinks that there is.

有没有办法删除不存在的引用?LOL

Is there some way to remove a reference that doesn't exist? LOL

更新:

它可能与我的XCode环境有关。在这里找到一些其他帖子后,我尝试了一个Clean All / Build / Touch,当我触摸时,我在XCode中收到以下错误:

It may have something to do with my XCode environment being jacked. After finding a few other posts on here, I tried a Clean All / Build / Touch and when I did the touch, I got the following error in XCode:

未捕获异常:

- [XCBuildLogWarningMessage setFileLocations:]:无法识别的选择器发送到实例0x2014dd0a0

-[XCBuildLogWarningMessage setFileLocations:]: unrecognized selector sent to instance 0x2014dd0a0

无论如何重新安装XCode而不搞乱其他所有事情?

Anyway to reinstall XCode without messing up everything else?

推荐答案

事实证明,iPhone模拟器上的位与XCode不同步。我做了'重置内容和设置',一切正常:)谁知道?

It turns out the bits on the iPhone simulator were out of sync with XCode. I did a 'Reset Content and Settings' and everything works :) Who knew?

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

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