Return to Snippet

Revision: 34167
at October 18, 2010 22:49 by tenveer


Initial Code
UIGraphicsBeginImageContext(self.window.bounds.size);
    [self.window.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    NSData * data = UIImagePNGRepresentation(image);
    [data writeToFile:@"board.png" atomically:YES];

Initial URL


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

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

Initial Tags


Initial Language
Objective C