1.在storyBoard中,选中tabBarController,设置tabBar中KeyPath中的(selectedImageTintColor)如图

tabBar中tabBarItem选中颜色自定义设置

2. 直接代码设置

tabBarController.tabBar.selectedImageTintColor = [UIColor orangeColor];

 

修改tabBarItem的字体颜色:[tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor redColor],NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-12-30
  • 2022-03-06
  • 2021-10-21
相关资源
相似解决方案