How to implement multiple PanGestures (Draggable views)?
I want to have several objects that I can drag and drop. Here's my code for moving one object (with lot of help from @vacawama): import UIKit class ViewController: UIViewController { @IBOutlet weak var panView: UIView! @IBOutlet weak var panViewCenterX: NSLayoutConstraint! @IBOutlet weak var panViewCenterY: NSLayoutConstraint! let panRec = UIPanGestureRecognizer() override func viewDidLoad() { super.viewDidLoad() panRec.addTarget(self, action: "draggedView:") panView.addGestureRecognizer(panRec) // Do any additional setup after loading the view, typically from a nib. } func draggedView(sender