iOS 设置状态栏的背景颜色

设置状态栏的背景颜色

- (void)setStatusBarBackgroundColor:(UIColor *)color

{

        UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];

    if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {

        statusBar.backgroundColor = color;

    }

}

posted @ 2016-08-30 17:00  Jn_Kindle  阅读(341)  评论(0编辑  收藏  举报