zoukankan      html  css  js  c++  java
  • 改动UINavigationBar (导航栏)上NavigationBarItem 的字体大小和颜色的用法

     //创建一个左边button

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

        //创建一个右边button

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


  • 相关阅读:
    HSF原理
    Spring IOC 容器源码分析
    Spring Bean注册和加载
    CAP和BASE理论
    Java内存模型
    Java线程模型
    IO复用、多进程和多线程三种并发编程模型
    无锁编程本质论
    An Introduction to Lock-Free Programming
    安装与配置ironic
  • 原文地址:https://www.cnblogs.com/claireyuancy/p/6938384.html
Copyright © 2011-2022 走看看