title: UIGestureRecognizer to Drag UIView
body: <p>I'm trying to build a <code>GestureRecognizer</code> to drag a <code>UIView</code> from right to left. If the user drag the View to the half of the screen, the View will be automatically dragged into the left corner to discard it, but if the user do not drag up to half the screen it will return to the corner right of the screen.
  Little lost here, any tutorials or something?
  Thanks</p>
  
  <p><strong>EDIT :</strong> Heres some code, its a <code>UIImageView</code>, inside a <code>UIScrollView</code>, i need to drag the entire scroll or just the image inside it :</p>
  
  <pre><code>_myScroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.window.bounds.size.width, self.window.bounds.size.height)]; [_myScroll setContentSize:CGSizeMake(self.window.bounds.size.width , 1300)];
  
  _tutorial = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.window.bounds.size.width, 1300)]; [_tutorial setImage:[UIImage imageNamed:@"Default"]];
  _tutorial.contentMode = UIViewContentModeScaleAspectFit; [_myScroll addSubview:_tutorial];
  
  _tutorial.userInteractionEnabled = YES;
      UIPanGestureRecognizer * recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:_tutorial action:@selector(handlePan:)]; 
   [_tutorial addGestureRecognizer:recognizer];
  
      [self.window addSubview:_myScroll];
  </code></pre>
  
  <p>And the method i try to drag the <code>UIImageView</code></p>
  
  <pre><code>- (IBAction)handlePan:(UIPanGestureRecognizer *)recognizer {
  
      CGPoint translation = [recognizer translationInView:_myScroll];
      recognizer.view.center = CGPointMake(recognizer.view.center.x + translation.x,
                                           recognizer.view.center.y + translation.y);
      [recognizer setTranslation:CGPointMake(0, 0) inView:_myScroll];
  
  }
  </code></pre>