修改NavigationBarItem的字体大小和颜色的使用方法
2016-07-08 13:26
519 查看
//创建一个左边按钮 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];
相关文章推荐
- JavaScript 语言中的 this
- android 随机数生成公式
- 《openssl 编程》之数据压缩
- 剑指offer-4-面试23:从上往下打印二叉树
- Citrix Netscaler下载试用版VPX操作方法
- 《openssl 编程》之大数
- 剑指offer——面试题3:二维数组中的查找
- junit 教程
- jquery 替换节点 replaceWith(), 和replaceAll( )
- Linux基础命令及快捷方式(未完版)
- 《openssl 编程》之文本数据库
- iOS SQLite 数据库迁移
- jquery里的$("#") 与$("#"+xx)
- 《openssl编程》之配置文件
- 用Python读红楼梦之——二、词云美化
- 《openssl编程》之BIO
- 《openssl编程》之openssl简介
- 拖动物体的时候,防止鼠标按下的时候对象突然跳动一下
- SSO单点登陆三种情况的实现方式详解
- class与id