forum

Home / DeveloperSection / Forums / about UIPasteboard clip in iPad Programming

about UIPasteboard clip in iPad Programming

Anonymous User 2332 04-Jun-2013
Hi Developers,

I want to implement a clipboard app using UIPasteboard, which can copy plain text and also rich format , web content in to the pasteboard , and then display on my TextView or WebView. how can i do that?

I have following code and it can get the plain text , but what if i copy a web content?

if ([pasteboard containsPasteboardTypes:[NSArray arrayWithObjects:@"public.utf8-plain-text", @"public.text", nil]]){
    if (![_contentList containsObject:pasteboard.string]){
        NSLog(@"String representation present: %@", pasteboard.string);
        [self addContentList:pasteboard.string];
        [pasteboard setValue:@"" forPasteboardType:UIPasteboardNameGeneral];
    }
}

Thanks in advance. 

Updated on 05-Jun-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By