首页 > 其他 > 详细

改动UINavigationBar (导航栏)上NavigationBarItem 的字体大小和颜色的用法

时间:2017-06-03 21:36:43      阅读:350      评论:0      收藏:0      [点我收藏+]

 //创建一个左边button

    UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"<" style:UIBarButtonItemStylePlain target:self action:@selector(clickLeftButton)];

//    leftButton.


[leftButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:

                                        [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName,

                                        [UIColor greenColor], NSForegroundColorAttributeName,

                                        nil

                              forState:UIControlStateNormal];

    //创建一个右边button

    UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"登陆" style:UIBarButtonItemStyleDone target:self action:@selector(clickRightButton)];

    [rightButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:

                                        [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName,

                                        [UIColor greenColor], NSForegroundColorAttributeName,

                                        nil]

                              forState:UIControlStateNormal];


改动UINavigationBar (导航栏)上NavigationBarItem 的字体大小和颜色的用法

原文:http://www.cnblogs.com/claireyuancy/p/6938384.html

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