我遇到了iPhone動畫塊的一個奇怪問題。 此代碼:UIView animateWithDuration:延遲:奇怪的工作
[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];
立即將背景設置爲紅色,而不經過藍色狀態。 即使是在這個代碼同樣的事情:
[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];
}];
也就是說,當我嘗試後的第一個已完成運行第二個動畫。 什麼問題?
什麼類型的對象是控制器? UIView,UILabel,其他? – Anna 2010-11-10 02:52:40