ios修改导航栏的title的文字颜色
2016-04-12 19:28
417 查看
UINavigationBar *navBar = [UINavigationBar appearance];
navBar.barTintColor = [UIColor redColor];
navBar.tintColor = [UIColor whiteColor];
[navBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
UIBarButtonItem *item = [UIBarButtonItem appearance];
item.tintColor = [UIColor whiteColor];
[item setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal];
效果如下
navBar.barTintColor = [UIColor redColor];
navBar.tintColor = [UIColor whiteColor];
[navBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
UIBarButtonItem *item = [UIBarButtonItem appearance];
item.tintColor = [UIColor whiteColor];
[item setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal];
效果如下
相关文章推荐
- 创建IOS的alert界面
- iOS Runtime学习笔记
- iOS NSPredicate数组筛选
- ios修改导航栏的背景颜色
- ios 图片裁剪加背景光环
- iOS开发---阿里巴巴IconFont适配技术
- IOS下的 NSTimer与Run loop Modes
- IOS使用ijkPlayer
- ios - loadView与viewDidload
- [IOS]Protocol协议及委托代理(Delegate)传值-用代码寻找storyboard相应视图
- ShareSDK在iOS9下注意事项
- iOS设备唯一标识(可以用版)
- iOS 关于信鸽推送点击推送通知的处理
- iOS 最简单的资料
- iOS 客户端MD5加密方法
- iOS中 imageNamed方法 非常多图片占用大量内存问题
- 应用之间跳转进行传值
- iOS之JSON解析和视频的简单播放
- 纪念一下我的短暂的ios时光
- iOS Core Animation系列之CADisplayLink