When a user long-press inside UIWebView, there is a Copy & Paste popup. Is it possible to disable the system from popup the Copy & Paste function, but still allow the user to click on links and goto new pages?
You can't ever disable it.. users can view the source of your page so the text is always available. If you put click handlers to disable right-click, they can turn javascript off.. The best you can try to do is make it inconvenient for people to deter them, but never can you prevent them.
i hope this work for you, because is work for me
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none';"];
[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitUserSelect='none';"];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With