/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
-(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]; }
URL: http://iphonesdksnippets.com/post/2009/05/12/Save-image-to-image-library.aspx
Comments
