iOSアプリでキャンセルする必要があるUIViewアニメーションが進行中です。私はこれを試しました:
[self.view.layer removeAllAnimations];
しかし、それはうまくいきませんでした。アニメーションは続きました。これが私のアニメーションコードです:
[UIView animateWithDuration:1.4 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
recognizer.view.transform = CGAffineTransformTranslate(recognizer.view.transform, translation.x, translation.y);
} completion:^(BOOL finished) {
NSLog(@"completed animation, now do whatever");
}];
なぜそれが機能しないのかについて誰かが何か考えを持っていますか?