donkey
donkey

Reputation: 4363

UITabBar.appearance().barTintColor does not work with custom color in Xcode

I try to tint my tab bar color to a test color as the following commented code (where it says "this does not work". Certainly, i have tried other colors) to no avail.

c

This is when I set the tint to system colors such as red.

a

This is when I tried to use custom color, nothing happens. b

Is this an error from my side? How to solve? Thank you in advance!

Upvotes: 0

Views: 482

Answers (1)

Onik IV
Onik IV

Reputation: 5047

Try this:

UITabBar.appearance().barTintColor = UIColor(red:140.0/255, green:200.0/255, blue:219.0/255, alpha:1)

Upvotes: 2

Related Questions