Chinaunix

标题: Could not load NIB in bundle 的解决方法 [打印本页]

作者: xw_max    时间: 2011-12-22 08:51
标题: Could not load NIB in bundle 的解决方法

由于删除了mainwindow.xib文件,使用代码生成了UIWindow,运行后,出现如下错误:


2011-07-26 20:03:43.780 TestUdpClient[864:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/xw/Library/Application Support/iPhone Simulator/4.3.2/Applications/C730AC6B-83A1-487F-B19B-228E89D4D2D7/TestUdpClient.app> (loaded)' with name 'MainWindow''



解决方法:

1) plist中删除Main nib file base name

2) main.c中, UIApplicationMain最后一个参数设置为UIApplicationDelegate的字符串名称。






欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2