首页 > 其他 > 详细

修改navigationitem的title颜色字体阴影等属性

时间:2015-10-12 22:34:19      阅读:293      评论:0      收藏:0      [点我收藏+]

设置导航条navigationBar上中间标题title 文字的样式

   
self.nav = [[[NavViewController alloc] initWithRootViewController:self.viewController] autorelease];
   [self.nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"navbg"] forBarMetrics:UIBarMetricsDefault];
   NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,[UIColor blackColor],UITextAttributeTextShadowColor,[UIFont boldSystemFontOfSize:20.0],UITextAttributeFont,CGSizeMake(0, -1.0),UITextAttributeTextShadowOffset, nil];
   self.nav.navigationBar.titleTextAttributes = dict;
 
有些属性名称在iOS8上又新的替代,只用将key名称替代即可

修改navigationitem的title颜色字体阴影等属性

原文:http://www.cnblogs.com/now-or-never/p/4872959.html

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