开发者

How to edit the MainWindow.xib (to change the default view it loads)

开发者 https://www.devze.com 2022-12-14 01:07 出处:网络
Hi I am trying to change the default view MainWindow.xib loads. I am using view based app. I changed the app delegate file, added my new view as a subview to the main window. but in interface builder

Hi I am trying to change the default view MainWindow.xib loads. I am using view based app. I changed the app delegate file, added my new view as a subview to the main window. but in interface builder it still says mainwindow.xib loads from the default view not my newly added vie开发者_StackOverflow社区w. (BTW I added a new xib file for my new view and that is the one I want to load at startup.)

thanks.


If you want to change from using MyAppViewController.xib to `MyOtherView.xib', you also need to change the class of the view controller in Interface Builder. You can do this by selecting the view controller, going to the Identity tab (the last one) and putting the class name of your new view controller in the "Class" field.


Change the 'Main nib file base name' in the Info.plist of your App too if you have another Main.XIB.

0

精彩评论

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

关注公众号