Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlightImageColor not working plz explain ho wit works #5

Open
manasclix opened this issue Oct 18, 2019 · 2 comments
Open

highlightImageColor not working plz explain ho wit works #5

manasclix opened this issue Oct 18, 2019 · 2 comments

Comments

@manasclix
Copy link

No description provided.

@Mh-ghadamyari
Copy link

I have the same problem please help me

@Thisura98
Copy link

Thisura98 commented Dec 9, 2020

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants