开发者

Do I really need a MainWindow.xib file?

I have an iPad 4.3 proj开发者_如何学Goect that doesn't have a MainWindow.xib because it's main view is created programmatically. Everything seems to work fine but I noticed that in my plist file there's a value for a NSMainNibFile key that has "MainWindow" for value. If I change in any way that entry, my app won't work. Now, that's strange, at least for me...


If you remove the xib reference in the target properties, be sure to change your code in main.m to refer to your class delegate class.

int retVal = UIApplicationMain(argc, argv, nil, @"YourAppDelegateClassName");


If you remove the NSMainNibFile key from your Info.plist, you need to update the code for main.m. You will need to update the NSString *delegateClassName in the call to UIApplicationMain.


No you don't necessarily need something called MainWindow.xib you could rename everywhere but as this answer points out you have to have something for the application to start with; What's the MainWindow.xib nib file for?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜