Created
September 10, 2011 16:13
-
-
Save darkseed/1208481 to your computer and use it in GitHub Desktop.
UITabbar background color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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