Objective
In the app's hybrid model development, Android development has WebView as a hybrid model development bridge, of course, in iOS also has a UIWebView component as a hybrid model development of the bridge, using the UIWebView components of the developers know, When UIWebView loads the display HTML page, the component itself provides some system default interaction behavior, this article to share is the iOS UIWebView implementation prohibits the user to copy the shearing function, below comes to look together.
Sample code
The controller implements this method
-(BOOL) Canperformaction: (SEL) Action Withsender: (ID) sender
{
if (action = = @selector (copy:) | |
action = = @selector (paste:) | |
Action = = @selector (cut:))
{return
NO;
}
return [Super Canperformaction:action Withsender:sender];
}
Summarize
The above is the entire content of this article, I hope the content of this article for your iOS developers can help, if you have questions you can message exchange.