开发者

iPad Utility Application - where is MainView.xib loaded?

开发者 https://www.devze.com 2023-03-13 15:34 出处:网络
I\'ve created a Utility application targeted at the iPad using the boilerplate code and I can quite happily load a new version of the FlipsideView.xib by changing the line

I've created a Utility application targeted at the iPad using the boilerplate code and I can quite happily load a new version of the FlipsideView.xib by changing the line

FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"Flipsid开发者_StackOverfloweView~iPad" bundle:nil];

In MainViewController.m, where FlipsideView~iPad.xib is a newly created copy of the original file.

However I cannot see where MainView.xib itself is loaded. I can change the MainWindow.xib to MainWindow~iPad.xib in the plist, and the FlibsideView.xib using the above in MainViewController.m, but I cannot see where MainView.xib is loaded. Where is that? Certainly I can just edit MainView.xib itself, but not understanding how this is loaded seems dangerous.


It is loaded by the UIApplicationMain function, which is called from main in the main.m file. The only way to change the name of the nib that is loaded is to change the NSMainNibFile key in your Info.plist file. See the UIApplicationMain reference for more information.

0

精彩评论

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