Commit a15900e3 authored by yuzheng's avatar yuzheng

修复allowPreview为No时,GIF可以被重复选中的问题

parent ab81c6c5
...@@ -574,11 +574,17 @@ static CGFloat itemMargin = 5; ...@@ -574,11 +574,17 @@ static CGFloat itemMargin = 5;
} else { } else {
// 2. select:check if over the maxImagesCount / 选择照片,检查是否超过了最大个数的限制 // 2. select:check if over the maxImagesCount / 选择照片,检查是否超过了最大个数的限制
if (tzImagePickerVc.selectedModels.count < tzImagePickerVc.maxImagesCount) { if (tzImagePickerVc.selectedModels.count < tzImagePickerVc.maxImagesCount) {
if (tzImagePickerVc.maxImagesCount == 1 && !tzImagePickerVc.allowPreview) { if (!tzImagePickerVc.allowPreview) {
model.isSelected = YES; BOOL shouldDone = tzImagePickerVc.maxImagesCount == 1;
[tzImagePickerVc addSelectedModel:model]; if (!tzImagePickerVc.allowPickingMultipleVideo && (model.type == TZAssetModelMediaTypeVideo || model.type == TZAssetModelMediaTypePhotoGif)) {
[strongSelf doneButtonClick]; shouldDone = YES;
return; }
if (shouldDone) {
model.isSelected = YES;
[tzImagePickerVc addSelectedModel:model];
[strongSelf doneButtonClick];
return;
}
} }
strongCell.selectPhotoButton.selected = YES; strongCell.selectPhotoButton.selected = YES;
model.isSelected = YES; model.isSelected = YES;
......
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
cropView.layer.borderWidth = 2.0; cropView.layer.borderWidth = 2.0;
}];*/ }];*/
//imagePickerVc.allowPreview = NO; // imagePickerVc.allowPreview = NO;
// 自定义导航栏上的返回按钮 // 自定义导航栏上的返回按钮
/* /*
[imagePickerVc setNavLeftBarButtonSettingBlock:^(UIButton *leftButton){ [imagePickerVc setNavLeftBarButtonSettingBlock:^(UIButton *leftButton){
......
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