About messages from UITapGestureRecognizer

前端 未结 3 518
清酒与你
清酒与你 2021-01-18 01:06

The following is from documentation :

Although taps are discrete gestures, they are discrete for each state of the gesture recognizer; thus the as

3条回答
  •  暖寄归人
    2021-01-18 01:34

    The UITapGestureRecognizer only fires when the gesture state is UIGestureRecognizerStateEnded

    If you want to use a gesture recogniser to detect the start and end of a press, use the UILongPressGestureRecognizer, with the minumumPressDuration set to 0

提交回复
热议问题