Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

faded, pale background color in UITabBar.background

guys, I am trying to customize UITabBar, but problem is that when I set up simple green background color in UITabBar.background, result is insufficient. Like something lies on background. Here it is look like: faded color

UITabBarController is created in storyboard, but background color I set up in code. Here is appDelegate:

TabBarController* bc=(TabBarController*)self.window.rootViewController;
bc.tabBar.backgroundColor=[UIColor greenColor];

If I set up pictures on background and on items - they just almost invisible. I've tried playing with tint colors on the right bar in storyboard, but all was useless.

like image 201
NikLanf Avatar asked Dec 06 '22 23:12

NikLanf


1 Answers

I had a similar issue when programmatically creating the UITabBarController background color in iOS 8. The problem was I was using backgroundColor when I should have been be using barTintColor. Try this.

TabBarController* bc=(TabBarController*)self.window.rootViewController;
bc.tabBar.barTintColor=[UIColor greenColor];

Let me know if that works for you.

like image 184
Storm Factory Avatar answered Dec 26 '22 18:12

Storm Factory