【发布时间】:2010-07-24 01:59:43
【问题描述】:
我想一次从PhotoAlbum 加载UIImages 的计数并显示在 UIView 上。
在 iOS3 中,它可能会喜欢:
NSString *file_path = @"/var/mobile/Media/DCIM/100APPLE/"
NSArray *imageSource = [fileManager contentsOfDirectoryAtPath:file_path error:nil] ;
UIImage *image = [UIImage imageWithContentsOfFile:[imageSource objectAtIndex:index]] ;
if (!image) {
NSLog(@"load image fail : %@" ,[imageSource objectAtIndex:index]) ;
}
return image ;
在 iOS3 中,这种方法是可行的! 但现在在 iOS4 中,我知道路径已更改为
@"/var/mobile/Media/PhotoData/100APPLE/"
imageSource 可以解析为 2 种类型的文件:.BTH(full size).THM(thumbnail),但它不能
从[UIImage imageWithContentsOfFile:XXX.BTH]读取BTH
这个问题有什么解决办法吗?或者这种方法应该被 Apple 拒绝?
非常感谢!
【问题讨论】: