0

how can i get image from UIPasteboard after the user click copy actually i can get Nsdata from UIPasteboard but i think it needs specific coding to be assigned to uiimageview how can i do this ? thanks for help.

john.k.doe
  • 7,533
  • 2
  • 37
  • 64

1 Answers1

0
NSData *data = // however you obtain the data
UIImage *image = [[UIImage alloc] initWithData:data];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.view addSubview:imageView];

Even better:

UIImage *image = [[UIPasteboard generalPasteboard] image];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.view addSubview:imageView];