Avoid/Disable default ActionSheet for Open,Copy from a UIWebview

Just check following image.
sugartin uiwebview avoid actionsheet for actions

So, while displaying contents in a UIWebView, you may face above problem for hyperlinks.
By long pressing over a hyper-link, by default UIWebView will display such action-sheet for providing above actions to user. In most of the custom Apps, Developer may want to get rid of it.
Here I have come up with a solution which will help you to achieve the same.

1. Make sure, your WebView-delegate is connected/set to your class.
2. put following line of code.

That is it. Just above few lines of code is enough to avoid such action-sheet.

Leave a Reply

Your email address will not be published. Required fields are marked *