admin管理员组文章数量:1289525
I want to provide my own action sheet or popover, don't want default system one.
Please notice that:
- I'm asking about long press not click.
- I need to know the URL of the link that is being long pressed.
I want to provide my own action sheet or popover, don't want default system one.
Please notice that:
- I'm asking about long press not click.
- I need to know the URL of the link that is being long pressed.
- @AndreiFilip see my answer below: stackoverflow./a/15603818/1371070 – Cezar Commented Mar 25, 2013 at 14:24
1 Answer
Reset to default 11In order to provide your own action sheet or popover, first you need to disable the default contextual menu. You can do it with javascript by using the following code, inside webViewDidFinishLoad
[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none';"];
Once you disable the default behavior you can create your own custom action sheet/popover.
One possible approach is described in the following link:
Customize the contextual menu of UIWebView
本文标签: javascriptHow to intercept long press on links in UIWebViewStack Overflow
版权声明:本文标题:javascript - How to intercept long press on links in UIWebView? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741423105a2377919.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论