how to fix status bar overlap issue in ios 7

后端 未结 4 1873
遇见更好的自我
遇见更好的自我 2020-12-06 14:36

I am developing an application that\'s working fine in IOS6. But in iOS7, the status bar overlaps with the view.

As an example :

4条回答
  •  太阳男子
    2020-12-06 15:19

    Try this code.use this code in your AppDelegate.m in did finishlaunching:

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
    [application setStatusBarStyle:UIStatusBarStyleLightContent];
    self.window.clipsToBounds =YES;
    self.window.frame =  CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
    }
    

提交回复
热议问题