码迷,mamicode.com
首页 > 移动开发 > 详细

iOS自定义NavigationBar

时间:2014-06-06 15:48:39      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

?
1
2
3
4
5
6
7
8
9
10
11
if (IS_IOS7()) {
            
           //  NavigationBar 颜色
           [[UINavigationBar appearance] setBarTintColor:HexColor(0xffffff)];
            
       } else {
            
           self.navigationController.navigationBar.tintColor = HexColor(0xffffff);
           //  状态栏颜色
           [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque animated: YES];
       }?
?
设置按钮
?
1
2
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle: @"XXXX" style: UIBarButtonItemStylePlain target: self action: @selector(XXXX)];
   self.navigationItem.rightBarButtonItem = rightItem;?
?

iOS自定义NavigationBar,布布扣,bubuko.com

iOS自定义NavigationBar

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/jz319/p/3766496.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!