Etiqueta arrastrable - ios
Tengo el requisito de mover una etiqueta solo cuando el usuario la toca y arrastra. No puedo averiguar si el usuario tocó esa etiqueta o no. He utilizado el método touchesMoved (Swift 2). Abajo está mi código
override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) {
super.touchesBegan(touches as Set<UITouch>, withEvent: event)
let touch = touches.first
if (touch!.view) == (moveLabel as UIView) // moveButton is my label
{
location = touch!.locationInView(self.view)
moveLabel.center = location
}
}
Cuando hago esto, mi etiqueta no se mueve :( alguien me ayude por favor