views:

118

answers:

2

Hello !

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 ?

Thanks in advance for sharing your great knowledge.

Sagar

A: 

You need to implement -copy: on the responder, not on the controller. So you need to subclass UIWebView and override -copy:.

Graham Lee
A: 

Ahh ! I got something here from this question.

Direct sample from Apple itself.

Theory :)

sugar