在OC中我们一般这么使用: -(void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event{ //获取手指触摸view是的任意一个触摸对象 UITouch * touch = [touches anyObject]; //获取是手指触摸的view UIView *view = [self view]; //获取手指触摸的中心(函数返回一个CGPoint类型的值,表示触摸在view这个视图上的位置,这里返回的位置是针对view的坐标系的。调用时传入的view参数为空的话,返回的时触摸点在整个窗口的位置。) CGPoint currentTouchPoint = [touch locationInView: view]; //该方法记录了前一个坐标值,函数返回也是一个CGPoint类型的值, 表示触摸在view这个视图上的位置,这里返回的位置是针对view的坐标系的。 CGPoint previousTouchPoint = [touch previousLocationInView: view]; } 在Swift3.0 中 override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { let touch = ((touches as NSSet).anyObject() as AnyObject) //进行类 型转化 let point = touch.location(in:self) //获取当前点击位置 let point2 = touch.previousLocation(in:self) //和上面一样 }