开发者

Using UILongPressGestureRecognizer on UITextField to start keyboard

开发者 https://www.devze.com 2023-02-16 05:18 出处:网络
I\'d like to use a UILongPressGestureRecognizer to start the keyboard, but I find that the UITextField still starts the keyboard when开发者_如何学Go double tapped.

I'd like to use a UILongPressGestureRecognizer to start the keyboard, but I find that the UITextField still starts the keyboard when开发者_如何学Go double tapped.

Is it possible to make UITextField ignore all other gestures?


Adding a gesture recognizer won't necessarily override the standard gestures for a control, unless the standard gesture is the same as or is a subgesture of the recognizer's gesture. This implies that you can override the standard gesture by attaching a matching recognizer (e.g. UITapGestureRecognizer) and setting no action for it.

0

精彩评论

暂无评论...
验证码 换一张
取 消