码迷,mamicode.com
首页 > 其他好文 > 详细

修改UINavigationBar 类

时间:2014-11-24 22:46:54      阅读:320      评论:0      收藏:0      [点我收藏+]

标签:uinavigationbar、swift、ios

 var item:UINavigationItem = UINavigationItem();

        var viewTitle = UIView();

            viewTitle.backgroundColor = UIColor.redColor();

            viewTitle.frame = CGRectMake(0, 0, 20, 30)

        

        item.titleView = viewTitle;

        

        var button:UIBarButtonItem = UIBarButtonItem(title: "Left_1", style: UIBarButtonItemStyle.Done, target: nil, action: "aaa");

        

         var button2:UIBarButtonItem = UIBarButtonItem(title: "Left_2", style: UIBarButtonItemStyle.Done, target: nil, action: "aaa");

 

        var button3:UIBarButtonItem = UIBarButtonItem(title: "Right_1", style: UIBarButtonItemStyle.Done, target: nil, action: "aaa");

        

        var button4:UIBarButtonItem = UIBarButtonItem(title: "Right_2", style: UIBarButtonItemStyle.Done, target: nil, action: "aaa");

        

        

        item.leftBarButtonItems = [button,button2]

        item.rightBarButtonItems = [button3,button4]

        

        nav.pushNavigationItem(item, animated: true);


bubuko.com,布布扣


bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣


修改UINavigationBar 类

标签:uinavigationbar、swift、ios

原文地址:http://9232578.blog.51cto.com/9222578/1582117

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