在application: application didFinishLaunchingWithOptions: launchOptions 增加以下代码就能够实现对tabbar的颜色的改动
//设定Tabbar的点击后的颜色
[[UITabBar
appearance] setTintColor:[UIColor
redColor]];
//设定Tabbar的颜色
[[UITabBar
appearance] setBarTintColor:[UIColor
whiteColor]];
这是效果图,再也不用为了改变颜色去自己定义UITabbar了
关于[UITabBar appearance]
下篇在介绍
时间: 2024-12-18 03:28:54