标签: objective-c uipasteboard
我已将图像作为数据复制到UIPasteboard,我需要将此图像自动粘贴到Message Compose,而无需用户交互。怎么做?
NSData *imageData = UIImagePNGRepresentation(image1); UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; [pasteboard setData:imageData forPasteboardType:@"public.png"];