简体   繁体   中英

How to disable long press gesture on UIWebView of iOS

I'm just wondering how to disable the long press gesture on webview in iOS. I need to disable only long press gesture not others. should work on iOS 5.0 + thank you

I want to thank all for help. I finally found the solution after intensive stackoverflow research. For help other :

In the javascript/html, you can avoid dealing with the longpress event.

The solution was given long time ago : Preventing default context menu on longpress / longclick in mobile Safari (iPad / iPhone)

I did it and it is just perfect. Thanks and thanks again.

JM

您可以将 UIWebView 作为您的自定义类之一的超类,扩展它......并覆盖 UIView 类中的 touchesBegan.. 方法......

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