4

I want to update my app for iOS 7. I installed app from app store on iOS 7, it looked good, UI was perfect. But when i installed app from Xcode 5, It shows navigation bar and other views beneath status bar. I read the iOS 7 transition document which suggested to use auto layout. My app target is 5.1 and later, Auto layout supports only iOS 6 and later versions.

Please tell me, How can i fix it.

user2163780
  • 173
  • 1
  • 8
  • ios max version is for ipad1. Even iPhone 4 can have ios7. Talk to your customer, boss and pray. ios 5 market share is around 5% now. I have asked min version ios6.0 for Autolayout and even that needed the anser with prefersStatusBarHidden –  Oct 11 '13 at 08:42

2 Answers2

7

This is the only thing that actually worked for me: Add this to your view controller.

- (BOOL)prefersStatusBarHidden
{
    return YES;
}
Bram
  • 5,692
  • 1
  • 40
  • 68
1

There's a complete answer to the status bar changes in this SO answer, but in short: no, there is no way to prevent the status bar from overlapping your application on iOS 7. You can "fake" it by moving all the view controllers of your app into an outer container view with a frame that is offset down from the top by 20 points.

Community
  • 1
  • 1
jaredsinclair
  • 12,547
  • 4
  • 33
  • 54