//修改导航栏背景色
self.navigationController.navigationBar.backgroundColor = [UIColor cyanColor];
//修改状态栏背景色
UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {
statusBar.backgroundColor = [UIColor cyanColor];
}
网友评论