title: iOS - How to stop animation of a view whenever any touch gesture is recognized
body: <p>I have a UIView on which I have added PanGestureRecognizer, My UI will behave like panning and after end of pan gesture it should continue to move on that direction with some deceleration. Which I have done. I show deceleration by a block</p>
  
  <pre><code>[UIView animateWithDuration:slideFactor*2
                        delay:0
                      options:UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionAllowUserInteraction
                   animations:^{
                       _movieView.center = finalPoint;
                 } completion:nil];
  </code></pre>
  
  <p>Now during animation if it recognizes another touch or tap or pan, It should stop at that point. So, that further panning can be done.</p>
  
  <p>My selector method for PanGestureRecognizer is doing something like this.</p>
  
  <pre><code>if ([panGesture state] == UIGestureRecognizerStateChanged)
  {
      [self mpvGestureStateBeginOrChanged:panGesture];
  }
  if ([panGesture state] == UIGestureRecognizerStateEnded)
  {
      [self mpvGestureStateEnd:panGesture];
  }
  if ([panGesture state] == UIGestureRecognizerStateBegan) 
  {
      [self.view.layer removeAllAnimations];
      // It stops at the final end position of the view
      // I want to stop animation right at the this point.
  }
  </code></pre>
  
  <p><strong>Note</strong> Due to some restrictions of UI, I can't use UIScrollView.
  Kindly suggest me something or solve the problem</p>