title: Reset UIView's frame with a pan gesture without hardcoding start values
body: <p>I have a UIPanGestureRecognizer that is attached to a UIView.  What I am trying to do is essentially drag and drop into a bucket.  If the user lets go of the UIView and it's not in the bucket, I want it to animate back to its original start location.  My selector that gets called for my UIPanGestureRecognizer is:</p>
  
  <pre><code>- (void)handleDragDescriptionView:(UIPanGestureRecognizer *)gestureRecognizer {
      UIView *panViewPiece = [gestureRecognizer view];
      CGRect originalFrame = CGRectMake(946, 20, 58, 30);
  
      CGPoint translation = [gestureRecognizer translationInView:panViewPiece];
      if (gestureRecognizer.state == UIGestureRecognizerStateBegan || gestureRecognizer.state == UIGestureRecognizerStateChanged) {
          panViewPiece.center = CGPointMake(panViewPiece.center.x + translation.x, panViewPiece.center.y + translation.y);
  
          [gestureRecognizer setTranslation:CGPointZero inView:panViewPiece.superview];
      }
      else if (gestureRecognizer.state == UIGestureRecognizerStateCancelled) {
          [UIView animateWithDuration:0.25 animations:^{
              self.dragDescriptionView.frame = originalFrame;
          }];
      }
      else {
          [UIView animateWithDuration:0.25 animations:^{
              self.dragDescriptionView.frame = originalFrame;
          }];
      }
  
  }
  </code></pre>
  
  <p>I was wondering if I could do this without the <code>originalFrame</code> at the top of the method.  I originally had</p>
  
  <pre><code>CGRect originalFrame = _dragDescriptionView.frame; 
  </code></pre>
  
  <p>instead of the hardcoding, but it doesn't snap back.  Probably because I'm updating that value as I am dragging.  I don't particularly like hardcoding values, but I wasn't sure if there was a way around this.  Thanks!</p>