I have a problem changing the background color of my UITabBar
. I have a UITabBarController
and UINavigationController
inside one with a root view.
Tab Bar Controller > Navigation Controller > Root View
In UITabBarController
class I have the following code:
[self.UITabBarHome setBackgroundColor:[UIColor greenColor]];
The color applies in my UITabBar
until I click the UITabBarItem
(Group) that directs to my UINavigationController
. When I click this item only, the color changes to the default color.How to avoid this?
I solved the problem by adding a UITabBar in the root view controller of the UINavigationController