您的位置:首页 > 移动开发 > IOS开发

ios 状态栏、菜单颜色设置 modal push tabBar navBar toolBar

2016-02-26 00:00 513 查看
modal设置和push设置是不同的

//modal  这个是UIBar
UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 20)];

UIColor * color=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];
statusBarView.backgroundColor=color;
[self.view addSubview:statusBarView];
//不显示电池
//[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];


//push和菜单颜色设置

//图标点击颜色
self.tabBar.tintColor=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];

UIColor *color=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];
//导航条颜色
[[UINavigationBar appearance] setBarTintColor:color];   //@{}代表Dictionary
//导航条字体颜色
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: