How to make multiple color tab bar in swift 3

1.2k Views Asked by At

I've been trying to find the solution to this for the last week, and I have had no luck after trying every possible solution I could find or think of. Every solution I found and have attempted has not worked.

I have 4 UITabBarItem's in a UITabBar placed within UITabBarController. I want to put individual background color (OR image) of the UITabBarItem. Screen shot is attached enter image description here

I am using Swift, and iOS SDK 9.3 in Xcode 8.0. If you can only answer in Objective-C that is fine too, any answer will help! Thank you all in advance, I really appreciate it!

2

There are 2 best solutions below

2
On BEST ANSWER
0
On

you can subclass the uitabbarcontroller and in this class in the viewDidLoad function add a views with background colors and imageViews with these icons to this view and make the view userInteractionEnabled = false