Commit 56412929 authored by yuzheng.tz's avatar yuzheng.tz

不允许选择gif图时不出现gif的标识;优化选原图时照片大小的显示

parent 132a5787
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
self.videoImgView.hidden = NO; self.videoImgView.hidden = NO;
_timeLength.tz_left = self.videoImgView.tz_right; _timeLength.tz_left = self.videoImgView.tz_right;
_timeLength.textAlignment = NSTextAlignmentRight; _timeLength.textAlignment = NSTextAlignmentRight;
} else if (type == TZAssetCellTypePhotoGif) { } else if (type == TZAssetCellTypePhotoGif && self.allowPickingGif) {
self.bottomView.hidden = NO; self.bottomView.hidden = NO;
self.timeLength.text = @"GIF"; self.timeLength.text = @"GIF";
self.videoImgView.hidden = YES; self.videoImgView.hidden = YES;
......
...@@ -404,7 +404,9 @@ static dispatch_once_t onceToken; ...@@ -404,7 +404,9 @@ static dispatch_once_t onceToken;
for (NSInteger i = 0; i < photos.count; i++) { for (NSInteger i = 0; i < photos.count; i++) {
TZAssetModel *model = photos[i]; TZAssetModel *model = photos[i];
if ([model.asset isKindOfClass:[PHAsset class]]) { if ([model.asset isKindOfClass:[PHAsset class]]) {
[[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:nil resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) { PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
options.resizeMode = PHImageRequestOptionsResizeModeFast;
[[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
if (model.type != TZAssetModelMediaTypeVideo) dataLength += imageData.length; if (model.type != TZAssetModelMediaTypeVideo) dataLength += imageData.length;
assetCount ++; assetCount ++;
if (assetCount >= photos.count) { if (assetCount >= photos.count) {
......
...@@ -422,6 +422,7 @@ ...@@ -422,6 +422,7 @@
[photoPreviewCell setImageProgressUpdateBlock:^(double progress) { [photoPreviewCell setImageProgressUpdateBlock:^(double progress) {
weakSelf.progress = progress; weakSelf.progress = progress;
if (progress >= 1) { if (progress >= 1) {
if (weakSelf.isSelectOriginalPhoto) [weakSelf showPhotoBytes];
if (weakSelf.alertView && [weakCollectionView.visibleCells containsObject:weakCell]) { if (weakSelf.alertView && [weakCollectionView.visibleCells containsObject:weakCell]) {
[weakTzImagePickerVc hideAlertView:weakSelf.alertView]; [weakTzImagePickerVc hideAlertView:weakSelf.alertView];
weakSelf.alertView = nil; weakSelf.alertView = nil;
......
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