Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 575
Brenden Avatar asked Dec 12 '22 09:12

Brenden


1 Answers

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.

like image 138
zinc1oxide Avatar answered Dec 13 '22 23:12

zinc1oxide