/ Published in: Objective C
Any view and it's subviews will be "flattened" into a UIImage that you can display or save to disk.
Expand |
Embed | Plain Text
- (UIImage*)imageFromView{ UIImage *image; UIGraphicsBeginImageContext(self.view.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }
You need to login to post a comment.
