Q:

UIPanGestureRecognizer on multiple view by swift

   let pan1 = UIPanGestureRecognizer(target: self, action: "pan:")
    self.dateView1.addGestureRecognizer(pan)
    self.dateView2.addGestureRecognizer(pan)
    self.dateView3.addGestureRecognizer(pan)
    self.dateView4.addGestureRecognizer(pan)

func pan(sender: UIPanGestureRecognizer) {

    let moveView = sender.view!
    let translation = sender.translationInView(self.View)
    moveView.center.x += translation.x
    moveView.center.y += translation.y
    sender.setTranslation(CGPointZero, inView: self.View)

How can i use a UIPanGestureRecognizer on multiple view。。。
now only move one view,Click on a matter which , can only move one

A:

Simple answer, you can't. It is not possible to assign a GestureRecognizer to multiple variables.
However, you can create multiple gesture recognizers which point to the same action ;)
Hope this'll help.

