/ Published in: Objective C
URL: http://iphonesdksnippets.com/post/2009/05/12/Save-image-to-image-library.aspx
Expand |
Embed | Plain Text
-(void)savePictureToLibrary{ UIImage *img = [[UIImage imageNamed:@"image.png"]; UIImageWriteToSavedPhotosAlbum(img, self, @selector(image:didFinishSavingWithError:contextInfo:), self); } - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Saved." message:str delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil]; [alert show]; }
Comments
Subscribe to comments
You need to login to post a comment.

Hi, i used this same method or similar:
-(IBAction)screenShot{ maintimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(update) userInfo:nil repeats:YES]; }
-(void)update{
}
But now i need to know how to bring this picture back so i can post it in a email. How can i get this printscreen back? Thanks.