This is a common issue when adding view controllers to a tab 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.
Tab bar controllers support full-screen layout differently from the way most other controllers support it. You can still set the wantsFullScreenLayout property of your custom view controller to YES if you want its view to underlap the status bar or a navigation bar (if present). However, setting this property to YES does not cause the view to underlap the tab bar view. The tab bar controller always resizes your view to prevent it from underlapping the tab bar.
For more detailed explanation you can see this Question.