//移动监听 override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) { let touch : UITouch = touches.first! let currentP:CGPoint=touch.locationInView(self) let preP:CGPoint=touch.previousLocationInView(self) let offsetX=currentP.x-preP.x let offsetY=currentP.y-preP.y self.transform=CGAffineTransformTranslate(self.transform, offsetX, offsetY) }
浙公网安备 33010602011771号