FluidBottomNavigation-ios
FluidBottomNavigation-ios copied to clipboard
highlightImageColor not working plz explain ho wit works
I have the same problem please help me
It looks like the highlightImageColor gets overridden by the tintColor.
I got this to work by creating my own FluidTabBarItemContentView subclass as follows.
class CustomContentView: FluidTabBarItemContentView{
private let customHighlightColor: UIColor = .red
private let customNormalColor: UIColor = .yellow
override func updateDisplay() {
super.updateDisplay()
imageView.tintColor = selected ? customHighlightColor : customNormalColor
}
}
Then I simply passed the above subclass into the FluidTabBarItem constructor as follows.
let customCV = CustomContentView()
let homeItem = FluidTabBarItem(customCV, title: "Home", image: homeIcon, tag: 0)
I got the result I want using this workaround but it will be better if the author gave a permanent fix :)