首页 > 其他 > 详细

UINavigationController 操作记录

时间:2015-08-12 18:35:51      阅读:112      评论:0      收藏:0      [点我收藏+]

      //设置字体大小 颜色

    {

        UIColor *color = [UIColor brownColor];

        UIFont * font = [UIFont systemFontOfSize:20];

        NSDictionary * dict = [NSDictionary dictionaryWithObjects:@[color,font] forKeys:@[NSForegroundColorAttributeName ,NSFontAttributeName]];

        self.navigationController.navigationBar.titleTextAttributes = dict;

    }

    

    //设置左右按钮

    {

        UIBarButtonItem * leftBtn = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"leftBarItem"] style:UIBarButtonItemStyleDone target:self action:@selector(leftClicked)];

        [self.navigationItem setLeftBarButtonItem:leftBtn];

        

        UIBarButtonItem * rightBtn = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"rightBarItem"] style:UIBarButtonItemStyleDone target:self action:@selector(rightClicked)];

        [self.navigationItem setRightBarButtonItem:rightBtn];

 

    }

    //设置背景颜色

    {

        [self.navigationController.navigationBar setBarTintColor:[UIColor orangeColor]];

    }

UINavigationController 操作记录

原文:http://www.cnblogs.com/rollrock/p/4724749.html

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