Reputation: 2217
How can I make a screenshot programmatically in iOS?
Upvotes: 0
Views: 258
Reputation:
have fun
UIGraphicsBeginImageContext(self.view.bounds.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *myScreenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Upvotes: 3