//czq 设置状态栏颜色
- (void)setStatusBarBackgroundColor:(UIColor*)color {
UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
if ([statusBarrespondsToSelector:@selector(setBackgroundColor:)]) {
statusBar.backgroundColor= color;
}
}
[self setStatusBarBackgroundColor:MainColor];
网友评论