My problem is that I want to disable a user from copying and pasting in a UIWebView.
Asked
Active
Viewed 767 times
0
-
does this work for you? http://stackoverflow.com/questions/6676369/how-to-disable-copy-and-paste-in-uiwebview – Cheng-Yu Hsu Apr 23 '16 at 02:06
1 Answers
0
You can find the answer here: https://stackoverflow.com/a/5516027
Swift version of the solution:
// deactivate copy and paste
for checkView in webView.subviews {
if let scrollView = checkView as? UIScrollView {
for checkView in scrollView.subviews {
checkView.userInteractionEnabled = false
}
break
}
}