Commit 83b8f6b2 authored by yuzheng.tz's avatar yuzheng.tz

加入获取原图的示例

parent 1c22b435
......@@ -512,6 +512,25 @@
NSLog(@"location:%@",phAsset.location);
}
}
/*
// 3. 获取原图的示例,这样一次性获取很可能会导致内存飙升,建议获取1-2张,消费和释放掉,再获取剩下的
__block NSMutableArray *originalPhotos = [NSMutableArray array];
__block NSInteger finishCount = 0;
for (NSInteger i = 0; i < assets.count; i++) {
[originalPhotos addObject:@1];
}
for (NSInteger i = 0; i < assets.count; i++) {
PHAsset *asset = assets[i];
[[TZImageManager manager] getOriginalPhotoWithAsset:asset completion:^(UIImage *photo, NSDictionary *info) {
finishCount += 1;
[originalPhotos replaceObjectAtIndex:i withObject:photo];
if (finishCount >= assets.count) {
NSLog(@"All finished.");
}
}];
}
*/
}
// If user picking a video, this callback will be called.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment