I have a “navigation based application” which also needs to have a view always displayed at the bottom of the screen at all times. I added this new view to a UIWindow after adding the UINavigationController’s view:
// In my delegate's applicationDidFinishLaunching method
[window addSubview:navigationController.view];
[window insertSubview:disclaimerController.view aboveSubview:navigationController.view];
[window makeKeyAndVisible];
This works fine except for rotation. The second view I added doesn’t rotate correctly. It doesn’t change position and it’s view controller’s rotate methods don’t get called.
Obviously, I’m going about this the wrong way. My question is, how can I have a second view on screen that’s not part of navigation controller’s view? Thanks.
If you are adding a view on top of another by adding as subview rotation will not work (view won’t be notified of rotation). What you can do is register the view with the device to be notified of rotation events, then you can programatically handle rotation (it will not do it for you).