首页 > 其他 > 详细

UINavigationController改变UINavigationBar导航条标题颜色跟字体

时间:2016-03-31 00:08:56      阅读:242      评论:0      收藏:0      [点我收藏+]

UINavigationController改变UINavigationBar导航条标题颜色跟字体

UINavigationController改变UINavigationBar导航条标题颜色和字体

iOS 5 以后 UINavigationController 可以 改变UINavigationBar导航条标题颜色和字体

 

 

[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:

                                                                     [UIColor colorWithRed:0 green:0.7 blue:0.8 alpha:1], UITextAttributeTextColor,

                                                                     [UIColor colorWithRed:0 green:0.7 blue:0.8 alpha:1], UITextAttributeTextShadowColor,

                                                                     [NSValue valueWithUIOffset:UIOffsetMake(0, 0)], UITextAttributeTextShadowOffset,

                                                                     [UIFont fontWithName:@"Arial-Bold" size:0.0], UITextAttributeFont,

                                                                     nil]];

    

 

其中 UITextAttributeTextColor和UITextAttributeFont 属性是文字颜色和字体

UINavigationController改变UINavigationBar导航条标题颜色跟字体

原文:http://www.cnblogs.com/liumu/p/5339421.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!