我不知道这段代码有什么问题。与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在收缩结束之前显示得很好。
任何帮助将不胜感激。
感谢