作者:铁骑侠客_685 | 来源:互联网 | 2023-09-09 12:20
Thisoneisadoozy这是一个非常棒的……MybuddyjustdownloadedtheiPhoneSDKonhisSnowLeopardMacBo
This one is a doozy...
这是一个非常棒的……
My buddy just downloaded the iPhone SDK on his Snow Leopard MacBook Pro. No matter what kind of project he creates (Window Based, View Based, etc...,) he can't create or use his own xib files. The project will compile and run fine until he adds a new xib file.
我的朋友刚刚在他的雪豹MacBook Pro上下载了iPhone SDK。无论他创建什么样的项目(基于窗口、基于视图等等),他都不能创建或使用自己的xib文件。这个项目将编译并正常运行,直到他添加一个新的xib文件。
Here are some symptoms:
这里有一些症状:
- When he selects a pre-generated xib in Xcode (such as MainWindow.xib), no preview is shown on the right hand side. Double clicking on this file will open it in interface builder (This is correct behavior).
- 当他在Xcode(例如MainWindow.xib)中选择一个预先生成的xib时,在右边没有显示预览。双击这个文件将在interface builder中打开它(这是正确的行为)。
- When he selects his own custom xib, the preview pane displays the XML content of the xib. Double clicking on his custom xib opens up the XML file in Xcode - as if it were a standard code file (This is jacked up).
- 当他选择自己的自定义xib时,预览窗格将显示xib的XML内容。双击他的自定义xib,打开Xcode中的XML文件——就好像它是一个标准的代码文件(这是被加起来的)。
- Opening his custom xib from finder opens it in Interface Builder.
- 从finder中打开他的自定义xib,在Interface Builder中打开它。
- When building the application, the build warning says something to the effect of "Warning: No rule to process file /path/to/CustomXib of type sourcecode.xib for architecture i386"
- 构建应用程序时,构建警告的作用是“警告:没有处理源码类型的文件/路径/到/CustomXib的规则”。xib i386架构”
At runtime he gets the error:
在运行时,他会得到错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "MyCustomXib"'
由于未捕获异常“NSInvalidArgumentException”而终止应用程序,原因是:“-[UIViewController _loadViewFromNibNamed:bundle:]无法加载名为“MyCustomXib”的nib
We've uninstalled Xcode from the command line and reinstalled. I've verified that it's the right version for his machine. I'm stumped!
我们已经从命令行卸载Xcode并重新安装。我已经证实这是他的机器的正确版本。我难住了!
5 个解决方案