views:

25

answers:

1

How do I make a tab bar transparent in cocoa touch?

Thx

Evolve

+1  A: 

Since UITabBar is a subclass of UIView, have you tried adjusting its alpha property?

Note that if you are trying to modify a tab bar associated with a UITabBarController, you should consider this warning from Apple, located in the reference for UITabBar:

Important: In iOS 3.0 and later, you should not attempt to use the methods and properties of this class to modify the tab bar when it is associated with a tab bar controller object. Modifying the tab bar in this way results in the throwing of an exception. Instead, any modifications to the tab bar or its items should occur through the tab bar controller interface. You may still directly modify a tab bar object that is not associated with a tab bar controller.

Shaggy Frog
Thanks, alpha was just what I needed. For anyone else who needs to try this. lets say your tabbar is called tabBar just go: tabBar.alpha = 0.5 // sets transparency to 50%
Evolve