1

We have an app that is currently having issues with the iOS 7 status bar (or the lack thereof when running the app- the app itself moves up and covers the status bar, somewhat merging them together), throwing the entire layout off.

We found an answer to this issue, here: New iOS 7 statusBar leaves a range 20px in apps compiled in Xcode 5

The problem with the answer, in which the user states that you must set the "Window's Y Parameter" to 20... is that I have no clue what they are talking about, and am having no luck finding it on Google!

Does anyone know where this parameter is at? Could someone give me general directions? =D

Community
  • 1
  • 1
user1548103
  • 869
  • 2
  • 12
  • 25

2 Answers2

2

if you are talking about setting application windows frame, you can set the frame of window in didFinishLaunchingWithOptions method of appdelegate.

self.window.frame = CGRectMake(0.0,
                               20.0,
                               self.window.frame.size.width, 
                               self.window.frame.size.height);

This is only for portrait orientation as you have to set frames accordingly for landscape. I would not recommend you to use this approach.

Daniel
  • 23,129
  • 12
  • 109
  • 154
sohail059
  • 830
  • 1
  • 6
  • 14
0

You can use [self.window setFrame:[[UIScreen mainScreen]bounds]]; in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method or set this frame manually like @sohail059 answer. Maybe, the best way to avoid this thing is to hide status bar. You can use it by

-(BOOL)prefersStatusBarHidden{
    return YES;
}

in your viewcontrollers or to add View controller-based status bar appearance to your info.plist file, and set it to NO . But if you want to use status bar in your application try the answer that you linked in your question

Igor Prusyazhnyuk
  • 133
  • 2
  • 14
  • 29