Skip to content

Instantly share code, notes, and snippets.

@darkseed
Created September 10, 2011 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkseed/1208481 to your computer and use it in GitHub Desktop.
Save darkseed/1208481 to your computer and use it in GitHub Desktop.
UITabbar background color
//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]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment