iOS状态栏设置样式
2017-04-20 15:11
330 查看
在info.plist中,将View controller-based status bar appearance设为NO
单独的一个页面
UIView *statusBarView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 20)]; statusBarView.backgroundColor = [UIColor colorWithRed:36/255.0 green:58/255.0 blue:100/255.0 alpha:1]; [self.view addSubview:statusBarView]; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
全局的
在appdelegate中UIView *statusBarView = [[UIView alloc] initWithFrame:CGRectMake(0, -20, self.window.frame.size.width, 20)]; statusBarView.backgroundColor = [UIColor colorWithRed:36/255.0 green:58/255.0 blue:100/255.0 alpha:1]; [self.navigationController.navigationBar addSubview:statusBarView]; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent; [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationBar"] forBarMetrics:UIBarMetricsDefault]; [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
相关文章推荐
- IOS设置状态栏样式和背景
- IOS 设置ipone状态栏的样式
- ios设置状态栏隐藏和样式
- iOS设置状态栏样式,statusBarStyle
- iOS 7设置状态栏样式
- iOS-设置某些页面的状态栏样式
- iOS统一设置状态栏的样式,交给代理AppDelegate
- iOS开发之设置状态栏样式
- iOS设置状态栏样式,显示控制,statusBarStyle, statusBar
- iOS设置状态栏样式,statusBarStyle
- iOS平台设置系统状态栏(通知栏、顶部状态栏)样式背景颜色或透明
- 二十一,iOS app图标数字,状态栏样式等设置
- iOS设置状态栏样式,statusBarStyle
- UI_iOS应用状态栏样式设置_及导航栏(NavigationBar)透明
- iOS开发 设置状态栏样式
- ios--状态栏统一样式:黑色背景白色字体
- iOS如何把所有界面的状态栏的字体颜色都设置为白色
- ios开发之键盘样式风格设置
- iOS开发-键盘样式风格有关设置
- iOS开发之iOS7设置状态栏字体颜色