I'm trying to make my tabBar transparent, I've searched but all I found was articles resulting in partly and not fully transparent tabBars and some were for IOS 5, etc.
I would like to accomplish this as seen in Sketch 3:
What's the easiest way to accomplish this?
I thought of doing this:
// Make the tabBar transparent
self.tabBarController.tabBar.backgroundColor = [UIColor clearColor];
self.tabBarController.tabBar.translucent = YES;
but that result wasn't exactly perfect:
Really appreciate help!:)
Sincerely, Erik
Update
// Make the tabBar transparent
[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
self.tabBarController.tabBar.translucent = YES;
Have you tried the barTintColor
?
[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
[[UITabBar appearance] setBackgroundImage:[UIImage new]];
That should do the trick.
Swift 3.0
... call this code in the AppDelegate's didFinishLaunchingWithOptions
let tabBar = UITabBar.appearance()
tabBar.barTintColor = UIColor.clear
tabBar.backgroundImage = UIImage()
tabBar.shadowImage = UIImage()
The result will be a transparent background for every UITabBar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With