如何在iPhone Safari浏览器的弹出操作表中添加选项? [英] How to add an option to the popup actionsheet of iphone safari?

查看:93
本文介绍了如何在iPhone Safari浏览器的弹出操作表中添加选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用UIWebview,当按住链接一秒钟时,将弹出一个动作表,其中包含一些打开",复制"和取消"选项.
如何在操作表中添加自定义选项?

I am using UIWebview in my app, when tap and hold on a link for a second an actionsheet pops up with some options OPEN, COPY and Cancel.
How to add a custom option to the actionsheet ?

推荐答案

不,你不能.

弹出操作表中的按钮是每种数据类型的硬编码.您无法从网站上进行更改.您可以通过覆盖 UIWebDocumentView UIWebURLAction 中的各种私有方法来更改按钮,但由于它们未记录类.

The buttons in the popup action sheet are hardcoded for each data type. You can't change that from a web site. You can change the buttons by overriding various private methods in UIWebDocumentView and UIWebURLAction, but you can't do these in AppStore apps anyway since they are undocumented classes.

这篇关于如何在iPhone Safari浏览器的弹出操作表中添加选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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