I\'m working on a universal app, and I\'m trying to share as much code as possible between the iPhone and iPad versions. I need to use a TabBarController as my root view contro
UINavigationController is normally displayed as a full-screen controller, which means that (when displayed as the root view controller of the window) the top part of its view is placed under the status bar. It then manually positions its navigation bar and content view to not underlap the status bar when the status bar is visible. Unfortunately, it doesn't really handle things correctly when it is being positioned by some other view controller, it (sometimes) assumes it needs to leave that 20px gap without checking whether its view actually is under the status bar.
The solution is to set wantsFullScreenLayout
on the UINavigationController to NO, so it won't even attempt to leave that gap for the status bar.