2010-01-04 84 views

回答

0

你能做的最好的保存關閉在自己的應用程序所拍攝的照片可寫目錄,然後使用它...請注意,如果您多次保存到用戶庫,它將每次都會創建一個新的映像。

您可能需要提交與蘋果Radar以允許對文件的直接訪問,或給你一些參考,你可以用它來查看文件(看到例如EXIF)。

+0

我會那樣做.__ – cduck 2010-01-04 07:48:51

1

這使您可以將圖像保存到相冊:

// 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]; 
} 
+0

如何在下次啓動我的應用程序時用戶不必從UIImagePickerController中選擇圖像的情況下重新打開圖像? – cduck 2010-01-04 06:41:36

+1

不幸的是,在做了一些挖掘之後,可能無法通過AppStore發佈應用程序。您可以將它們保存到相冊和您自己的目錄(並且您可以在自己的目錄中打開這些目錄而沒有任何問題),但是應用程序無法訪問相機的相冊。 – justin 2010-01-05 00:23:53

相關問題