2011-08-16 6 views
0

Je suis écrire ce code, mais l'avertissement est montrent "insertSubview" peut ne pas répondrechanger la couleur de fond UITabBar

- (void)viewDidLoad { 

    [super viewDidLoad]; 

    CGRect frame = CGRectMake(0, 0, 480, 49); 

    UIView *v = [[UIView alloc] initWithFrame:frame]; 

    UIImage *i = [UIImage imageNamed:@"GO-21-TabBarColorx49.png"]; 

    UIColor *c = [[UIColor alloc] initWithPatternImage:i]; 

    v.backgroundColor = c; 

    [c release]; 

    [[self tabBar] addSubview:v]; 

    [v release]; 

} 
+2

J'ai toujours eu du mal à personnaliser UITabBars – RSully

+0

c'est une question dublicante parfaite .qui répond à cette question aussi http://stackoverflow.com/questions/571028/changing-tint-background-color-of-uitabbar –

Répondre

Questions connexes