take a screen shot of the view and save it in photo library

/ Published in: Objective C
Save to your folder(s)

take a screen shot of the view passed in "UIGraphicsBeginImageContext"

Copy this code and paste it in your HTML
  1. UIGraphicsBeginImageContext(self.window.bounds.size);
  2. [self.window.layer renderInContext:UIGraphicsGetCurrentContext()];
  3. UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  4. UIGraphicsEndImageContext();
  5. NSData * data = UIImagePNGRepresentation(image);
  6. [data writeToFile:@"board.png" atomically:YES];

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.