I have a webview in my application. I want to handle when user copies something from web view, my custom method – should be triggered. I have tried following.
I have placed following method in myViewCtr.m file
-(void)copy:(id)sender{
NSLog(@"hi ! Hello ");
}
But nothing working – what should I do to implement the same ?
You need to implement
-copy:on the responder, not on the controller. So you need to subclassUIWebViewand override-copy:.