I am new to iPhone development. I have been looking at samples and make a sample for myself, but am stuck.
I am trying to add a view to the AppDelegate class so it will show when the app is launched.
code is as follows
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:viewController.view];
[window makeKeyAndVisible];
}
However this does not show the .xib tied to the viewController but the MainWindow.xib is shown.
I think it is being added since when I shut the app down the content of the desired view is shown as it is shutting down.
I thought the addSubview puts the view in front of all others when called.
Is there something I should do in the Interface Builder to set priorities?
Updated:
By lowering the alpha attribute to 0.0 for the UIWindow for MainWindow.xib made the view that was added by addSubview apear. However this is prob not the right thing to do.