美文网首页
UIStatusBar设置颜色

UIStatusBar设置颜色

作者: Fintecher | 来源:发表于2017-02-13 16:46 被阅读71次
//设置状态栏颜色
- (void)setStatusBarBackgroundColor:(UIColor *)color {
    UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
    if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {
        statusBar.backgroundColor = color;
    }
}

相关文章

网友评论

      本文标题:UIStatusBar设置颜色

      本文链接:https://www.haomeiwen.com/subject/obktwttx.html