IOS7 状态栏 保持黑底白字 方法

已测试过可行的方法:

plist里UIViewControllerBasedStatusBarAppearance设置为NO;

在appdelegate中添加

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);
        self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height);
    }

 

你可能感兴趣的:(iphone)