1

Is there a way to change the tint of a specific TabBarItem and leave it tinted regardless of the selection state?

What I want is something similar to the UITabBar used in Facebook's Messenger where the center button is always tinted blue.

Any idea how to achieve this effect?

FYI - I'm currently setting the unselected color programmatically and the selected color directly in XCode, but as expected, those colors are applied to all of the tabs.

     /// Set the default color for the tabs for unselected state
    if #available(iOS 10.0, *) {
        UITabBar.appearance().unselectedItemTintColor = UIColor.lightGray
    } else {
        // Fallback on earlier versions
    }

Messenger's TabBar

enter image description here

fs_tigre
  • 10,650
  • 13
  • 73
  • 146

0 Answers0