Completely transparent UITabBar in iOS 8

Erik picture Erik · Oct 9, 2014 · Viewed 21.7k times · Source

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:

enter image description here

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:

enter image description here

Really appreciate help!:)

Sincerely, Erik

Update

// Make the tabBar transparent
[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
self.tabBarController.tabBar.translucent = YES;

Answer

Johannes Fahrenkrug picture Johannes Fahrenkrug · Oct 9, 2014

Have you tried the barTintColor?

[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
[[UITabBar appearance] setBackgroundImage:[UIImage new]];

That should do the trick.