tags:

views:

356

answers:

4

Hi

I have a UIWebView. In this, i want to catch when the user use the copy menu in order to copy selection into a pasteboard.

Afterwards when the user touch a button, the content will be paste in a mail.

I want to intercept when the user click on copy or cut menu. so i had this two methods :

- (void)cut:(id)sender
{
    NSLog(@"cuuuuuuuuuut");
}


- (void)copy:(id)sender
{
    NSLog(@"copyyy");
}

when i click on the cut menu, NSlog print cuuuuuuuuuut but when i click on the copy menu , NSLog print nothing (copy method isn't called).

why ?

A: 

Hmm, is cut wired in Interface Builder, but copy isn't?

Epsilon Prime
A: 

neither cut neither copy. and yet, it works for cut !!!! What's the problem ?

Sly33
A: 

May I suggest UIPasteboard in the documentation? (Developer membership required)

JoePasq
Unless you just want to do your own methods, but UIPasteboard comes with the nice Apple looks already.
JoePasq
A: 

uipasteboard will be useful when i will want to retreive the content of the general pasteboard. But for the moment i just want to intercept the copy event in a uiwebview... Someone could help me ?

Sly33