2010-08-24 6 views

Répondre

7
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 300, 50)]; 
    [button setTitle:@"hi" forState:UIControlStateNormal]; 
    [button setBackgroundColor:[UIColor blackColor]]; 
    [self.view addSubview:button]; 
    [UIView beginAnimations:nil context:nil]; 
    [UIView setAnimationDuration:2.5]; 
    button.backgroundColor = [UIColor whiteColor]; 
    [UIView commitAnimations]; 
0

Propriété backgroundColor est animable depuis la version 3.2 SDK.

Questions connexes