I need to customise TabBar
in my iOS Application as shown in the image
I need to change the background colour, unselected image tint colour and selected image tint colour. How can this be done
I need to customise TabBar
in my iOS Application as shown in the image
I need to change the background colour, unselected image tint colour and selected image tint colour. How can this be done
For that you need to set barTintColor
and tintColor
property of UITaBbar
.
self.tabBarController?.tabBar.barTintColor = .blue //Background Color
self.tabBarController?.tabBar.tintColor = .yellow //Selected Item tint color
Note: If you have image for both state means default and selected, then set both the images for its sets, check this answer to set selected image for tabbar item. Now set the Render mode
of both the image to Original Image
in assets, if you don't know how to set that check this answer.