我怎樣才能知道手指何時關閉以及手指何時關閉UITapGestureRecognizer
?
documentation說我應該只處理UIGestureRecognizerStateEnded
作爲水龍頭,所以這意味着有UIGestureRecognizerStateBegin
當手指停下來,但我得到的只是UIGestureRecognizerStateEnded
。
我使用登記識別器中的代碼是:檢測手指向上/向下UITapGestureRecognizer
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)]
如果你有同樣的問題,看看這個鏈接,這是一個美女:[guides.codepath.com](https://guides.codepath.com/ios/Using-Gesture-Recognizers#programmatically-add -and-配置-A-姿勢的識別器) – MoVod