Reputation:
Is there any way to remove black line between view and tab bar?
Upvotes: 0
Views: 710
Reputation: 1347
I put my tab bar image like :-
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
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