Return to Snippet

Revision: 15902
at July 21, 2009 00:56 by arpit


Initial Code
-(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{

    NSString *str = @"Saved!!!";

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Saved." message:str delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];

    [alert show];

}

Initial URL
http://iphonesdksnippets.com/post/2009/05/12/Save-image-to-image-library.aspx

Initial Description


Initial Title
Save Image to Photo Lib rary

Initial Tags


Initial Language
Objective C