iOS7设置UINavigationBar的标题格式
2015-07-16 14:54
453 查看
在iOS7之前,通过设置UITextAttributeTextColor即可,
NSMutableDictionary *atts = [NSMutableDictionary dictionary];
atts[UITextAttributeTextColor] = [UIColor whiteColor];
在iOS7之后,UITextAttributeTextColor属性作废,改为NSForegroundColorAttributeName属性
NSMutableDictionary *atts = [NSMutableDictionary dictionary];
atts[NSForegroundColorAttributeName] = [UIColor whiteColor];
在学习过程中可以由旧属性推出新属性,可以先使用UITextAttributeTextColor,进入该属性后会看到API的如下提示
UIKIT_EXTERN NSString *const UITextAttributeTextColor NS_DEPRECATED_IOS(5_0, 7_0, "Use NSForegroundColorAttributeName");
所以完全可以通过系统自带的提示找到新属性
NSMutableDictionary *atts = [NSMutableDictionary dictionary];
atts[UITextAttributeTextColor] = [UIColor whiteColor];
在iOS7之后,UITextAttributeTextColor属性作废,改为NSForegroundColorAttributeName属性
NSMutableDictionary *atts = [NSMutableDictionary dictionary];
atts[NSForegroundColorAttributeName] = [UIColor whiteColor];
在学习过程中可以由旧属性推出新属性,可以先使用UITextAttributeTextColor,进入该属性后会看到API的如下提示
UIKIT_EXTERN NSString *const UITextAttributeTextColor NS_DEPRECATED_IOS(5_0, 7_0, "Use NSForegroundColorAttributeName");
所以完全可以通过系统自带的提示找到新属性
相关文章推荐
- 【.Net码农】RDLC, canGrow=True, canShrink=False, content are shrinked to the left in Safari.
- UITextField的tintColor和textColor
- String,StringBuffer与StringBuilder的区别
- uicontrol图形对象用户界面的用法
- druid连接池使用
- Architectures、Valid Architectures、Build Active Architecture Only、armv6, armv7, armv7s, arm64和i386
- Codeforces Round #312 (Div. 2) D. Guess Your Way Out! II 贪心排序
- UIView 中常见的方法总结
- [SoapUI] 通过Groovy调用批处理文件.bat
- (转)ueditor使用webuploader以后多图上传后顺序乱掉问题解决方法
- UI_UITabBarController
- 解决设置uiview的alpha属性后导致subviews页透明
- UILabel、UITextView自适应得到高度
- Android开发UI之动画侦听
- UIButton 上设置 self.imageView self.titleLabel
- Builder 建造者 (创建型)
- EasyUI datagird 排序 按数字类型的问题
- 玩转iOS 9的UIDynamics
- WPF standard ComboBox Items Source Change Issue
- Android中使用Handler机制更新UI的三种解决方案