iOS 7 - Status bar overlaps the view

aryaxt picture aryaxt · Sep 13, 2013 · Viewed 110.2k times · Source

I have a ViewController which is inside a UINavigationcontroller, but the navigationBar is hidden. When I run the app on iOS 7, the status bar shows on top of my view. Is there a way to avoid this?

I don't want to write any OS specific code.

Enter image description here

I tried setting View controller-based status bar appearance to NO, but it did not fix the issue.

Answer

aryaxt picture aryaxt · Sep 13, 2013

Xcode 5 has iOS 6/7 Deltas which is specifically made to resolve this issue. In the storyboard, I moved my views 20 pixels down to look right on iOS 7 and in order to make it iOS 6 compatible, I changed Delta y to -20.

enter image description here

Since my storyboard is not using auto-layout, in order to resize the height of views properly on iOS 6 I had to set Delta height as well as Delta Y.