Iphone UIWebView复制粘贴

Iphone UIWebView复制粘贴,iphone,ios,uiwebview,copy-paste,Iphone,Ios,Uiwebview,Copy Paste,我正在处理UIWebView操作Copy和paste。我不知道它是如何工作的。。 我需要做的是…当我点击链接时,它应该复制URL,并在UiTextField或浏览器栏中粘贴 我正在做的是: - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if([title isEqualToString:@"Copy"]){ NSURL *requestedU

我正在处理
UIWebView
操作
Copy
paste
。我不知道它是如何工作的。。 我需要做的是…当我点击链接时,它应该复制
URL
,并在
UiTextField
浏览器栏中粘贴

我正在做的是:

- (void)actionSheet:(UIActionSheet *)actionSheet
clickedButtonAtIndex:(NSInteger)buttonIndex {

if([title isEqualToString:@"Copy"]){ 

   NSURL *requestedURL = [request URL];
   NSString *link = [requestedURL absoluteString];
    UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];

    pasteboard.string = link;

    NSLog(@"paste is %@",pasteboard.string); // this does not give me the anything
  }
请让我知道我在复制方法、、中出错的地方,以及如何粘贴它。

通过此链接:-


谢谢…我的代码出错了。。。如果你能在这个问题上帮我,,,
[[UIPasteboard generalPasteboard] containsPasteboardTypes:UIPasteboardTypeListString];
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 
if (pasteboard.string != nil) { [self insertText:pasteboard.string]; }