iOS 设置导航栏的主题
来源:互联网 发布:sqlserver 注释快捷键 编辑:程序博客网 时间:2024/06/05 00:48
在导航控制器里
+ (void)initialize{ //设置导航栏主题(背景图片和文字属性) UINavigationBar *navBar = [UINavigationBar appearance]; //设置背景图片 NSString *bgName = nil; if ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0) { bgName = @"NavBar64"; }else{ bgName = @"NavBar"; } [navBar setBackgroundImage:[UIImage imageNamed:bgName] forBarMetrics:UIBarMetricsDefault]; //设置标题文字属性 NSMutableDictionary *attrs = [NSMutableDictionary dictionary]; attrs[NSForegroundColorAttributeName] = [UIColor whiteColor]; attrs[NSFontAttributeName] = [UIFont systemFontOfSize:16]; [navBar setTitleTextAttributes:attrs];}
0 0
- iOS 设置导航栏的主题
- iOS 设置导航条的主题
- ios-新浪微博(5)设置导航栏主题
- 设置导航栏按钮主题
- NavigationController 设置导航栏主题
- 导航控制器 导航栏主题设置代码
- iOS导航栏的设置
- ios 导航栏设置
- iOS 导航栏设置
- IOS ---设置导航栏
- iOS导航栏设置
- ios导航栏的背景图片设置
- iOS--导航栏属性设置的介绍
- IOS NavigitionController导航栏的基本设置
- iOS导航栏的一些设置
- ios中导航栏的设置
- 设置iOS导航栏透明
- ios设置导航栏属性
- 厦门渭康医院咨询
- 我的第一篇博客——开篇
- 数字转化为特定格式的字符串
- MySQL IN用法
- Activity的启动模式
- iOS 设置导航栏的主题
- JAVA基础篇六(Java,C++中的流)
- Android onconfiguration属性
- 【费用流】 HDOJ 5352 MZL's City
- leetcode_Evaluate Reverse Polish Notation
- 解决NDK开发中Eclipse报错“Unresolved inclusion jni.h”的最终方法
- 欧拉通路-Play on Words
- 2015 大一集训心得
- 《乌合之众》思维导图及优秀读后感