zoukankan      html  css  js  c++  java
  • UINavigationController 操作记录

          //设置字体大小 颜色

        {

            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]];

        }

  • 相关阅读:
    Python生成器
    Python迭代器
    Python异常处理
    Python面向对象进阶
    Python面向对象基础
    Python闭包和装饰器
    Python函数
    Python文件操作
    Python深浅拷贝
    Python的列表&元组&字典&集合
  • 原文地址:https://www.cnblogs.com/rollrock/p/4724749.html
Copyright © 2011-2022 走看看