내 앱에서 iPhone의 사진 라이브러리에있는 사진을 저장하고 열려면 어떻게해야합니까? 코드가 도움이됩니다.내 앱이 iPhone의 사진 라이브러리에서 사진을 저장하고 열어 보는 방법은 무엇입니까?
// Adds a photo to the saved photos album. The optional completionSelector should have the form:
// - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo;
UIKIT_EXTERN void UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);
(샘플 코드 :)
IImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
/// called function, alerts user when the image has been saved:
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
[ [ self parentViewController ] dismissModalViewControllerAnimated: YES];
}
나는 그것을 할 것이다 .__ – cduck