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 ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No you can't.
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.