iOS - 状态栏statusBar的背景颜色

//设置状态栏颜色

- (void)setStatusBarBackgroundColor:(UIColor *)color {
    UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
    if ([statusBar respondsToSelector:@selector(setBackgroundColor:)])      {
        statusBar.backgroundColor = color;
    }
}

摘自:http://www.jianshu.com/p/5c09c2700038

推荐阅读更多精彩内容