2

Is it possible? I need save the sreen and send from iPad to a WebService... Concretly the problem is that i want simulate a sign in the screen and later save this sign in a NSData and send by email.

Some idea?

thanks for all!

Best regards!

Alberto Juarez
  • 444
  • 8
  • 23

1 Answers1

2
UIView *view = ...; // Get root view of current view controller

UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

NSData *imageData = UIImagePNGRepresentation(viewImage);
ladoch
  • 106
  • 4