Commit a15900e3 authored by yuzheng's avatar yuzheng

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

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