user1679671
user1679671

Reputation:

UITabBar line between view and tab bar

Is there any way to remove black line between view and tab bar?

enter image description here

Upvotes: 0

Views: 710

Answers (2)

Rajeev Barnwal
Rajeev Barnwal

Reputation: 1347

I put my tab bar image like :-

enter image description here

and what I set it on tap bar like:-

CGRect frame = CGRectMake(0.0, 0.0, 320, 48);
        NSLog(@"%f",frame.size.width);
        UIView *v = [[UIView alloc] initWithFrame:frame];
        // [v setBackgroundColor:DARK_BACKGROUNDTabBar];
        UIImageView *imgView =[[UIImageView alloc]initWithFrame:frame];
        UIImage *img1 = [UIImage imageNamed:@"tabbar.png"];
        [imgView setImage:img1];
        [v addSubview:imgView];

        [v setAlpha:1];
        [[self.tabBarController tabBar] insertSubview:v atIndex:1];
        [v release];

Hope it will be use-full for you.

You can create your own image with 4 or 5 tab and set like above.

Upvotes: 0

rydgaze
rydgaze

Reputation: 1060

You would need to set a custom background image for the tab bar

UITabBarController* tab = [[UITabBarController alloc] init];
[tab.tabBar setBackgroundImage:[UIImage imageNamed:@"tabBackground.png"]];

Upvotes: 2

Related Questions