TabBarController is showing grey colour behind tab bar image

65 Views Asked by At

I am using an image to set in tab bar controller. some part of the image is transparent and should show view's content behind it. But it is not going clear and always show grey colour.

enter image description here

Here is the code i am using:

            let appearance = UITabBarAppearance()
            appearance.backgroundColor = .clear
            tabBar.isTranslucent = false
            appearance.backgroundImage = UIImage(named: "homeTabBG")
            tabBar.standardAppearance = appearance
            tabBar.barTintColor = .clear

1

There are 1 best solutions below

2
VizVyz On

Make the following change

tabBar.isTranslucent = true 

may be it seems to be work because I think for a transparent effect it should set to be as true.