`
lizhuang
  • 浏览: 884414 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

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 属性是文字颜色和字体
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics