Loading

Monday, June 14, 2010

Create Screen Shot of application

-(void) Save_Img
{
UIImageView *Img_Screen=[[UIImageView alloc]init];
UIGraphicsBeginImageContext(self.view.bounds.size); //self.view.window.frame.size
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
Img_Screen.image =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(Img_Screen.image, nil, nil, nil);
[Img_Screen release];
}

NOTE :- Remember to add #import QuartzCore/QuartzCore in .m

No comments:

Post a Comment