我使用animateKeyframesWithDuration
来简单地动画我的视图:
[UIView animateKeyframesWithDuration:1.0 delay:0.0 options:0 animations:^{
[UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.5 animations:^{
containerView.center = CGPointMake(containerView.center.x, 150);
}];
[UIView addKeyframeWithRelativeStartTime:0.5 relativeDuration:0.5 animations:^{
containerView.center = oldCenter;
}];
}completion:^(BOOL finished) {
}];
动画完成后(用finished = YES
调用的完成块),UIViewController
没有响应,例如我不能按UIViewController
上面的任何UIButton
。
为什么?
我在完成块中添加了这一行:
[transitionContext completeTransition:NO];