-1
時,這是我的錯誤,當我嘗試編譯我的項目:iOS的錯誤使用writeImageToSavedPhotosAlbum
Undefined symbols for architecture armv7:
"_writeImageToSavedPhotosAlbum", referenced from:
-[AddNewPhotoViewController imagePickerController:didFinishPickingMediaWithInfo:] in AddNewPhotoViewController.o
調用writeImageToSavedPhotosAlbum
當我得到的錯誤。我懷疑這個錯誤與不導入必要的框架有關,但我不知道要導入什麼。
任何幫助?
編輯
這裏是我的writeImageToSavedPhotosAlbum
代碼:
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// Access the uncropped image from info dictionary
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
[self dismissModalViewControllerAnimated:YES];
[_CameraOutput setImage:image];
writeImageToSavedPhotosAlbum(image, nil, @selector(image:didFinishSavingWithError:contextInfo:));
}
編輯#2 我已經包含在我的.m文件以下導入:
#import <AssetsLibrary/AssetsLibrary.h>
顯示你的代碼中調用'writeImageToSavedPhotosAlbum'。 – 2012-08-02 08:14:29
看到我的編輯,謝謝:-) – 2012-08-02 08:17:12
在問你有人建議你使用'writeImageToSavedPhotosAlbum'的問題,他們提供了一個鏈接到[文檔](https://developer.apple.com/library/ ios /#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html#// apple_ref/occ/instm/ALAssetsLibrary/writeImageToSavedPhotosAlbum:metadata:completionBlock :)它告訴你需要包含哪些框架 – 2012-08-02 08:18:18