why is there a delay when moving object using UIPanGestureRecognizer

前端 未结 3 537
时光说笑
时光说笑 2021-02-04 05:44

I\'m moving UIView object using UIPanGestureRecognizer - how much I drag my finger on screen, that much I move the view in the same direction (only in X - left or right, Y is no

3条回答
  •  长情又很酷
    2021-02-04 06:18

    Use a UILongPressGestureRecognizer and set the minimumPressDuration to 0.0. This recognizes instantly and you get all the same updates including the UIGestureRecognizerStateChanged with the updated location.

提交回复
热议问题