title: dragging images around the screen using swift
body: <p>I have tried this method </p>
  
  <pre><code>@IBAction func handlePan(recognizer:UIPanGestureRecognizer) {
  
   let translation = recognizer.translationInView(self.view)
   if let view = recognizer.view {
    view.center = CGPoint(x:view.center.x + translation.x,
                          y:view.center.y + translation.y)
  }
   recognizer.setTranslation(CGPointZero, inView: self.view)
  }
  </code></pre>
  
  <p>It is working but the problem is that when I use this method on multiple images it create some issues for example,
  when drag one image and change its position but when I click and drag second image . My first image come back to original position.
  Here are the images I am getting from a scroll view: 
  When I click second image 1st image also go the original position</p>
  
  <p><a href="https://i.stack.imgur.com/q1wG0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1wG0.png" alt="enter image description here"></a></p>
  
  <p>I am dragging an image its fine here</p>
  
  <p><a href="https://i.stack.imgur.com/0vMfE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0vMfE.png" alt="enter image description here"></a></p>