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.
精彩评论