-1

Can you please provide me with the code in swift for saving an image to clipboard and how it should be implemented. If you have any related tutorial that would be great too.

georgiohelou
  • 33
  • 1
  • 3
  • This is not a "please give me the code to solve my problem" site. It's a site where people ask for help with specific problems in code they've written. Do some research. If you can't come up with code yourself, at least tell us what you've read about in Apple's docs, and what APIs you think you should be using. Explain the specific parts of the docs you don't understand. That's much more likely to get help then a generic "please do all the work for me" post like your current question. That just annoys the people who you are asking to help you. – Duncan C Nov 22 '18 at 19:38

1 Answers1

0

Short example :

let image = UIImage(named: "image.png")
UIPasteboard.generalPasteboard().image = image;

For more information, look for UIPasteboard Class Reference : http://goo.gl/NaSt8z

PS : You might have to test that on device and not on simulator.

lchamp
  • 6,592
  • 2
  • 19
  • 27