My application is a rich editor that uses the UIWebView and HTML5 contenteditable features.
Now my application has some problems copying web content from safari to my UIWebView when web content has any image. I want to replace the html tag of the <img> image in UIPasteboard with some of my images,
However, when I use the following code to check the cardboard, there is NO any image in the cardboard box. But copying / pasting the safari image into my application is working fine.
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; NSLog(@"clip board strings = %@", pasteboard.strings); NSLog(@"clip board urls = %@", pasteboard.URLs); NSLog(@"clip board images = %@", pasteboard.images);
If I copy the image and text from safari, then open my application, NSLog below:
2012-04-20 14:53:37.558 clip board strings = ( "text" ) 2012-04-20 14:53:37.559 [46800:17903] clip board urls = ( ) 2012-04-20 14:53:37.559 [46800:17903] clip board images = (null)
I want to ask how to get image information from UIPastboard and how to manipulate it?
Thanks in advance.
tangqiaoboy
source share