zoukankan      html  css  js  c++  java
  • 修改NavigationBarItem的字体大小和颜色的使用方法

    //创建一个左边按钮
        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];
        //创建一个右边按钮
        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];
  • 相关阅读:
    容器之队列的使用
    容器之栈的使用
    rapidxml的使用
    C++判断文件夹是否存在并创建文件夹
    VS2017,不能将const char *转为char *
    CSS_day01_选择器
    HTML_day02_列表
    HTML_day01基本标签
    python_day3
    python_day2
  • 原文地址:https://www.cnblogs.com/jukaiit/p/5653104.html
Copyright © 2011-2022 走看看