UIWebView - 如何禁用操作表(UIActionSheet)? [英] UIWebView - How to Disable Action Sheets (UIActionSheet)?

查看:86
本文介绍了UIWebView - 如何禁用操作表(UIActionSheet)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何禁用UIActionSheets,特别是在UIWebView中点击并保存超链接后显示的动作表。默认情况下,这些似乎在UIWebViews中启用,其中包含警报标题中相应链接的链接地址。它们也在Safari中启用。

I would like to know how you can disable UIActionSheets, specifically the Action Sheets being displayed after tapping and holding hyperlinks in a UIWebView. These seem to be enabled by default in UIWebViews containing the link address of the respective link in the title of the alert. They are also enabled in Safari.

(如何)是否可以在UIWebView中禁用此类所有动作表?

(How) is it possible to disable all Action Sheets of this kind within a UIWebView?

提前致谢!

推荐答案

我自己就找到了这个解决方案。将其添加到您的CSS:

I just found this solution myself. Add this to your CSS:

body {
  -webkit-touch-callout: none;
}

要清楚,这会禁用操作表按住超链接时出现。

To be clear, this disables the action sheet that appears when you hold down a hyperlink.

这篇关于UIWebView - 如何禁用操作表(UIActionSheet)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆