-4

I need to customise TabBar in my iOS Application as shown in the imageenter image description here

I need to change the background colour, unselected image tint colour and selected image tint colour. How can this be done

Sidharth J Dev
  • 927
  • 1
  • 6
  • 25

1 Answers1

1

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.

Community
  • 1
  • 1
Nirav D
  • 71,513
  • 12
  • 161
  • 183