UIView animateWithDuration:délai: travail bizarre

J'ai rencontrer un problème étrange avec l'iPhone d'animation des blocs.
Ce code:

[UIView animateWithDuration:2 delay: 0 options: 0 animations:
^(void) { [controller setBackgroundColor: [UIColor blueColor]]; }
completion: nil];

[UIView animateWithDuration:2 delay: 2 options: 0 animations:
^(void) { [controller setBackgroundColor: [UIColor redColor]]; }
completion: nil];

Instantanément l'arrière-plan est rouge, sans passer le bleu de l'état.
La même chose, MÊME pour ce code:

[UIView animateWithDuration:2 delay: 0 options: 0 animations:
^(void) { [controller setBackgroundColor: [UIColor blueColor]]; }
completion: 

^(BOOL wrwg) {
    [UIView animateWithDuration:2 delay: 2 options: 0 animations:
    ^(void) { [controller setBackgroundColor: [UIColor redColor]]; }
    completion: nil];
}];

Qui est, lorsque j'essaie d'exécuter la deuxième animation APRÈS la première a fini.
Quel est le problème?

  • Ce type d'objet est le contrôleur? Une UIView, UILabel, d'autres?
InformationsquelleAutor wh1t3cat1k | 2010-11-09