Ardra Thambi
Ardra Thambi

Reputation: 137

How to create transparent tabbar in ios

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

Answers (3)

kuldeep Tyagi
kuldeep Tyagi

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

Nikita Khandelwal
Nikita Khandelwal

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

Nabeel Thobani
Nabeel Thobani

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

Related Questions