i am working on custom emoji keyboard it is an keyboard extension and problem is that on clicking button i need to copy image in pasteboard and paste it into another app . i have used these code but not able to copy image into pasteboard
-code in .h file
UIPasteboard *pasteboard_img;
-code in viewDidLoad()
pasteboard_img = [UIPasteboard generalPasteboard];
-code in method which is call when button is pressed on keyboard
[pasteboard_img setImage:[UIImage imageNamed:[array_image objectAtIndex:sender.tag]]];
~ where array_image is array with image name.
0 comments:
Post a Comment