我的项目中有这段代码:
- (void) fadeImageView {
[UIView animateWithDuration:1.0f
delay:0
options:UIViewAnimationCurveEaseInOut
animations:^{
self.imageView.alpha = 0.0f;
}
completion:^(BOOL finished) {
//make the image view un-tappable.
//if the fade was canceled, set the alpha to 1.0
}];
}
但是,在某些情况下,我想在 imageview 变得不可见之前取消此操作。有没有办法取消这个动画中间动画?