Commit 9ec606b1 authored by yuzheng.tz's avatar yuzheng.tz

健壮getPhotosBytesWithArray方法,传入图片数组为空时直接返回0B

parent a5fc3e48
......@@ -399,6 +399,10 @@ static dispatch_once_t onceToken;
/// Get photo bytes 获得一组照片的大小
- (void)getPhotosBytesWithArray:(NSArray *)photos completion:(void (^)(NSString *totalBytes))completion {
if (!photos || !photos.count) {
if (completion) completion(@"0B");
return;
}
__block NSInteger dataLength = 0;
__block NSInteger assetCount = 0;
for (NSInteger i = 0; i < photos.count; i++) {
......
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