iPhone iOS how to paste image into a UIImageView with long press

1.3k Views Asked by At

I got a general idea that I can use a UIPasteBoard to control the copy/paste contents. I would like to allow the user to long press on an image and overwrite that image with the paste board contents.

What concerns me is how to do this in a user-friendly way. I do not know how to present the Apple-style "copy/paste" callout for a UIImageView. Are there any examples of how this is done?

1

There are 1 best solutions below

1
On BEST ANSWER

The class you are looking for is UIMenuController. It will let you display a standard copy/paste menu from any view.

This question has more info: How to get UIMenuController work for a custom view?