Friday, July 17, 2009

[iPhone] save image to Photo Library.

Hello, everyone.

Today, I'll see how I can save an Image to Photo Library.

Call 'UIImageWriteToSavedPhotoAlubm' method in UIImagePickerController.h with your 'UIImage object'.

That's all :) It's so easy, isn't it ?

Let me see the declaration of this method.

UIKIT_EXTERN void UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);



This method also adapt selector to inform complete ( or error).

A selector should be formed like....

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo;

Have nice day, and wish your happiness :)


No comments:

Post a Comment