I set animation effect after do panning object
-(void)panView:(UIPanGestureRecognizer*)recognizer{
//do sth...
if(recogizer.state==UIGestureRecognizerStateEnded){
[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveEaseOut animation^{
//do sth2...
}completion:^(BOOL finished){
//do sth3...
}];
}
}
The problem is while animation is playing and I pan that object again. The new panning is not happen and I should wait until animation complete so I can do panning again.
How can I interrupt animation to suddenly do new panning???
Solution
add UIViewAnimationOptionAllowUserInteraction to options. and may set self.layer removeAllAnimations before redo pan.