Reputation: 137
In my iOS app I'm using UItabbar
.I want to set transparent colour to tabbar
. How can i create a transparent tabbar
?
Upvotes: 0
Views: 3283
Reputation: 61
self.tabBarController.tabBar.barTintColor = [UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0];
self.tabBarController.tabBar.translucent = NO;
Upvotes: 0
Reputation: 1741
Set the TabBar's tint color to clearColor. code1:
[[self tabBar] setTintColor:[UIColor clearColor]];
code2:
self.tabBarController.tabBar.barTintColor = [UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0];
self.tabBarController.tabBar.translucent = NO;
You can use any1 of them.
Upvotes: 1
Reputation: 939
You need to create a UIVIEW and set its opacity/alpha value or just clear the background color. Then you need to insert the view in UITabBar
See the link for the example
How to get a fully transparent TabBar in UITabBarController
Upvotes: 0