1

How to set UITabbar unselected ItemTintColor in iOS 9.0 below. UITabBar.appearance().unselectedItemTintColor

  if #available(iOS 10.0, *) {

    } else {
        // Fallback on earlier versions 
    UITabBar.appearance().tintColor = .white


    }
kiran
  • 3,725
  • 5
  • 41
  • 86

1 Answers1

0

You can do it by assigning two different images for selected or unselected state.

Or by adding a runtime tint color attribute in storyboard to UITabBarItems:

  • for selected use tintColor
  • for unselected use unselectedItemTintColor
Regexident
  • 29,108
  • 10
  • 91
  • 98
Jaimin
  • 121
  • 9
  • I did that its working fine from iOS version (10.0) not below like i.e 9.0. from the above code the selected color showing in white color and unselected colour need to show in red color in below iOS version 9.0 – kiran Nov 06 '18 at 08:08
  • in that case try using two different images for selected and unselected state you can refer this link : https://stackoverflow.com/questions/22767098/how-to-change-inactive-icon-text-color-on-tab-bar/29363917 – Jaimin Nov 06 '18 at 08:13