views:

1004

answers:

1

I'm trying to develop a new application based on the standard Utility template, which has a MainView and a FlipsideView, and allows the user switch between the two with a cool flipping effect. I've used this template many times with no problem, but now that I want to use a UINavigationController on the FlipsideView, I found out a problem. The navigation controller results placed 20px below the top of the available screen! So, the first 20px are taken by the standard status bar (the one with the battery indicator, the carrier etc.), then there are 20px of empty/white space, and then the navigation UI starts. The result is represented here: http://www.iphonedevsdk.com/forum/iphone-sdk-development/6952-flipping-uinavigationcontroller-problem.html

Does anyone have a solution for this? The workaround suggested in the post above doesn't work..

A: 

Are you creating your UINavigationController programmatically, or in Interface Builder? Either way, it sounds like your problem is that you have two views in your hierarchy which are each trying to leave 20 pixels clear at the top.

There's another post about this problem where they solved it by adding this call after creating the navigation controller, so perhaps there isn't a "natural" way to solve this and you need this kind of workaround:

[optionsRootController.view setFrame: [self.view bounds]];
David Maymudes