iOS小技巧15-改变UITabBarItem 字体颜色
2015-12-24 11:59
411 查看
iOS小技巧15-改变UITabBarItem 字体颜色
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //UITabBarItem字体的颜色 没有被选中的时候 [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:[UIColor blackColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal]; //UITabBarItem字体的颜色 被选中的时候 [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:[UIColor redColor],NSForegroundColorAttributeName, nil]forState:UIControlStateSelected]; return YES; }
著作权声明:本文由http://www.bestnathan.com/原创,欢迎转载分享。请尊重作者劳动,转载时保留该声明和作者博客链接,谢谢
相关文章推荐
- 使用buildroot制作交叉编译工具
- js下读取input中的value值
- IOS中UITableViewCell使用详解
- mybatis 中insert语句报如下错误: Incorrect integer value: '' for column 'pic_len' at row 1
- UILabel上的文字 单独改变 属性
- 分割视图控制器(UISplitViewController)
- PHP 性能分析第二篇: Xhgui In-Depth
- UITableViewController和UIRefreshControl实现下拉刷新功能
- ueditor使用会于第三方发生冲突
- UIScrollView中contentSize、contentInset、contentOffset介绍
- 解决The current branch is not configured for pull No value for key branch.master.merge found in confi
- CoreBluetooth框架(转)
- UILabel
- String,StringBuffer与StringBuilder的区别
- iOS 教你学UI控件的封装
- PHP 性能分析第一篇: Intro to Xhprof & Xhgui
- 法院执行人信息 业务 使用了多线程 cookie BlockingQueue 的一本程序
- Rails 多态关联 :polymorphic => true
- proguardgui.bat来混淆已有的jar包
- 如何在 Ubuntu 中安装最新的 Arduino IDE 1.6.6