Double-tap or two single-taps?

前端 未结 6 1796
轮回少年
轮回少年 2021-02-02 17:46

What is the time limit for two taps to be considered a double-tap, on the iPhone OS?

// Edit: Why is this important?

In order to handle single-tap and double-tap

6条回答
  •  终归单人心
    2021-02-02 18:16

    In the Apple provided example of the iPhone Application Programming Guide: Event Handling (mentioned by user Italy) a delay of 0.3 is used:

    [self performSelector:@selector(handleSingleTap:) withObject:touchLoc afterDelay:0.3];
    

提交回复
热议问题