Draggable label - ios
问题 I have a requirement to move a label around only when the user touches on it and drags. I cant find out whether the user touched that label or not. I have used the touchesMoved method(Swift 2). Below is my code 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)