我不知道這段代碼有什麼問題。與UIView,animateWithDuration和完成問題
[UIView animateWithDuration:10.0f delay:0.0f options:UIViewAnimationOptionTransitionNone animations:^{ CGAffineTransform transform = CGAffineTransformMakeScale(0.1, 0.1); self.transform = transform; } completion:^(BOOL finished) { if (finished) { NSLog(@"Animation finished"); [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"NSShowHomeScreen" object:nil ]; } }];
即使有一個持續10秒,我得到的控制檯消息「動畫完成」立即爲動畫開始。
我想縮小/縮放我的第一個UIView,之後我想展示另一個UIView。但是現在第二個UIView在收縮結束之前顯示得很好。
任何幫助將不勝感激。
感謝