我想在iOS 7中更改状态栏的背景颜色,
这是我的代码片段:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [UIApplication sharedApplication].statusBarHidden = NO; self.window.clipsToBounds = YES; [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleLightContent]; self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20); self.window.bounds = CGRectMake(0,self.window.frame.size.height); ... ... }
当我写这个它显示状态栏与黑色背景我想要它与红色背景
:
如何用红色背景而不是黑色改变状态栏的颜色?