> 
> Is it possible to change color of UITabBar instead of the default color black?
> And also is it possible to change background color of UITabBarItem's 
> background
> color instead of default color blue? If yes, how?

There is no API for changing the UITabBar.  Yet, you can subclass the 
TabBarController and override the viewDidLoad method.  For example,

@interface UITabBarController (private)
- (UITabBar *)tabBar;
@end

@implementation CustomUITabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
        
    CGRect frame = CGRectMake(0.0, 0.0, self.view.bounds.size.width, 48);
    UIView *v = [[UIView alloc] initWithFrame:frame];
    [v setBackgroundColor:[UIColor redColor]];
    [v setAlpha:0.5];
    [[self tabBar] addSubview:v];
    [v release];
}

@end

This would set a red tint to the tab bar.  Check on stackoverflow.com for many 
more examples.  Keep in mind the above example modifies the tabBar of the 
controller, which is specifically mentioned in the documentation not to mess 
with.  So, use at your own risk. 

Greg
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to