How to set UITabBar unselected ItemTintColor in iOS 9.0

304 Views Asked by At

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


    }
1

There are 1 best solutions below

2
On

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