2011-08-23 35 views

回答

1

該方法在寫出文件之前遞歸地驗證所有包含的對象是屬性列表對象。

試試這個:

for (UIImage *image in arrayWithImages) { 
    NSString *pngPath = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Documents/%@", @"nameOfTheImage.png"]]; 
    UIImagePNGRepresentation(image) writeToFile:pngPath atomically:YES]; 
} 

也許你可以使用[UIImageJPEGRepresentation(image, 1.0) writeToFile:jpgPath atomically:YES];寫圖像爲JPEG格式。

+0

我想這是我會做的,手動迭代通過保存每個圖像。 PS歡迎來到S O:] –