简体   繁体   中英

Single Tap Gesture recognizer is not working on UIScrollView for resignFirstResponder?

I want to use sigle tap for the first responder to resign (keyboard). When my app starts, there is an alert asking for password and when I enter into the app there is a text box and button to create a file.

When I use [singleTap setNumberOfTapsRequired:1]; the button is not responding. But when I use the taps as 2 then it works. I am confused.

I believe the event is a touch up inside event. In this case, two taps might be creating one event - such that the first tap is considered the down event and the second event is the released event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM