iOS 7 status and navigation bar different height in storyboard than in app

ios, objective-c, uistoryboard

Solution

When you use Apple's Navigation controller which inserts a navigation bar, it will have different heights based on your orientation. For example, the navigation bar is 44 points in portrait and 32 points in landscape. In your case, I'm guessing when your app runs, it is in landscape, thus the "top layout guide" is y:52 (32+20).

See this related post: NavigationBar with rotation.

Problem

This is a view controller than is modally presented and therefore full screen. In the storyboard, the "top layout guide" is at `y:64`. That is what I would expect when the status bar is `height:20` and navigation bar is `height:44`. However, when the app runs, the "top layout guide" is `y:52`. I have no idea how or why it's losing 12 points.

Original source