/ Published in: Objective C
take a screen shot of the view passed in "UIGraphicsBeginImageContext"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
UIGraphicsBeginImageContext(self.window.bounds.size); [self.window.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [data writeToFile:@"board.png" atomically:YES];