UITabBar 设置字体的颜色(选中状态/正常状态)setTitleTextAttributes
2024-10-11 10:24:37
UITabbar有个setTintColor这个方法,可以理解为,高亮的时候,或者点击后的颜色设置。
UITabBarItem有个setTitleTextAttributes的方法,是用来设置字体的颜色。
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor redColor], NSForegroundColorAttributeName,
nil] forState:UIControlStateNormal];
UIColor *titleHighlightedColor = [UIColor greenColor];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
titleHighlightedColor, NSForegroundColorAttributeName,
nil] forState:UIControlStateSelected];
最新文章
- Android中Path类的lineTo方法和quadTo方法画线的区别
- sqlserver附加 mdf、ldf的方法(手记)
- Flex 对象克隆
- 浏览器判断是否安装APP
- uva12716 gcd
- Xcode的command+shift+o是一个不错的工具
- Inside Flask - 配置的实现
- java 集合类说明与区别
- webx学习1
- 十四、Spring Boot 日志记录 SLF4J
- MM-科目自动分配
- Admin注册和路由分发详解
- eclipse的快捷键【转载】
- ajax实现
- Direct2D教程III——几何(Geometry)对象
- java多线程技术之条件变量
- Nginx配置https和wss
- selenium测试(Java)--操作cookie(十七)
- Codeforces Round #417 (Div. 2) B. Sagheer, the Hausmeister
- poj3348凸包面积
热门文章
- topcoder SRM 593 DIV2 WolfDelaymaster
- Codeforces Round #264 (Div. 2)
- 象写程序一样写博客:搭建基于github的博客
- Linux 高级网络编程
- 转载--thinkphp框架的路径问题 - 总结
- Use a PowerShell Module to Easily Export Excel Data to CSV
- Powershell的内置变量
- 【液晶模块系列基础视频】2.虚拟U盘
- yii2.0安装创建应用shiyong 归档文件安装
- service mongod start start: Unknown job: mongod问题