public
Created

UITabbar background color

  • Download Gist
gistfile1.m
Objective-C
1 2 3 4 5 6 7 8 9 10 11 12
 
//Add this to a subclass of UITabbar controller
 
- (void)viewDidLoad
{
[super viewDidLoad];
CGSize tabBarSize = [self.tabBar frame].size;
UIView *tabBarFakeView = [[UIView alloc] initWithFrame:CGRectMake(0,0,tabBarSize.width, tabBarSize.height)];
[self.tabBar insertSubview:tabBarFakeView atIndex:0];
[tabBarFakeView setBackgroundColor:[UIColor redColor]];
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.