animateKeyframesWithDuration使屏幕在动画后不响应



我使用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];

最新更新