Experimento un problema extraño con los bloques de animación de iPhone. Este código :UIView animateWithDuration: retraso: trabajando raro
[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];
establece de forma instantánea el fondo de color rojo, sin pasar por el estado azul. Lo mismo incluso para este código:
[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];
}];
Es decir, cuando trato de ejecutar la segunda animación DESPUÉS de que el primero ha terminado. ¿Cuál es el problema?
¿Qué tipo de objeto es el controlador? Una UIView, UILabel, otra? – Anna