/ 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
Copy this code and paste it in your HTML
- (UIImage*)imageFromView{ UIImage *image; UIGraphicsBeginImageContext(self.view.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }
Comments
