아이폰어플개발정보2010. 6. 24. 11:37
이미지를 이미지 라이브러리에 저장하는 방법

by alex 12. 5월 2009 15:28


-(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];

}



출처 : http://blog.naver.com/PostView.nhn?blogId=amoros21&logNo=140107111195
Posted by 오늘마감

댓글을 달아 주세요