Reputation: 1320
How to make transparent custom tab bar? I set the background image is transparent image but tab bar having the black image? How to I remove the black image? Please help me. See the image.
Upvotes: 0
Views: 2694
Reputation: 2163
Set the TabBar's tint color to clearColor
.
[[self tabBar] setTintColor:[UIColor clearColor]];
Upvotes: 1
Reputation: 26383
Try that, create an image and set as background ios5=> only:
CGRect rect = CGRectMake(0, 0, 1, 1);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [[UIColor clearColor] colorWithAlphaComponent:0.8].CGColor);
CGContextFillRect(context, rect);
UIImage *transparentImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.tabBarController.tabBar setBackgroundImage:transparentImage];
Upvotes: 1