UIPanGestureRecognizer translateInView, locationInView

假设在panGesture的回调事件里已经拿到了panGestureRecognizer

CGPoint point = [panGestureRecognizer locationInView:self.view];//获得的是当前的触摸点的坐标

CGPoint point2 = [panGestureRecognizer translateInView:self.view];//获得的是当前的触摸点相对于起始触摸点的偏移量

上一篇:WOJ -1204


下一篇:mongodb常用命令学习笔记