openfrog
openfrog

Reputation: 40765

How to obtain a copied image from the pasteboard?

I have a photo editing app where I want to provide a way for the user to edit photos from the pasteboard. For example the user might copy a photo from his website in Safari and then head over to my app and choose "Open from pasteboard". Kind of like Photoshop does it.

How can I get notified or check if there is a picture or graphic (probably a UIImage) in the pasteboard? And how could I obtain that image?

Upvotes: 0

Views: 1442

Answers (1)

Bourne
Bourne

Reputation: 10312

I needed one for a UIImage and this snippet helped me out.

You can always extract the image out using:

UIImage *image = [UIPasteboard generalPasteboard].image;

Upvotes: 2

Related Questions