iOS copy multiple images to pasteboard

大兔子大兔子 提交于 2019-12-21 21:43:47

问题


I can copy one image to the pasteboard like so:

UIPasteboard *pasteboard;
pasteboard = [UIPasteboard generalPasteboard];
UIImage *image;
[pasteboard setImage:image];

How can I copy two or three images to the pasteboard?


回答1:


[[UIPasteboard generalPasteboard] setImages:[NSArray arrayWithObjects:firstImage, secondImage, nil]];

I think this is all you're looking for. It is also possible to set a single image with multiple types (PNG, JPG, etc.) so that it is more likely that another application will find a usable image.

~ Good Luck



来源:https://stackoverflow.com/questions/8864775/ios-copy-multiple-images-to-pasteboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!