File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -574,11 +574,17 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
574574 } else {
575575 // 2. select:check if over the maxImagesCount / 选择照片,检查是否超过了最大个数的限制
576576 if (tzImagePickerVc.selectedModels .count < tzImagePickerVc.maxImagesCount ) {
577- if (tzImagePickerVc.maxImagesCount == 1 && !tzImagePickerVc.allowPreview ) {
578- model.isSelected = YES ;
579- [tzImagePickerVc addSelectedModel: model];
580- [strongSelf doneButtonClick ];
581- return ;
577+ if (!tzImagePickerVc.allowPreview ) {
578+ BOOL shouldDone = tzImagePickerVc.maxImagesCount == 1 ;
579+ if (!tzImagePickerVc.allowPickingMultipleVideo && (model.type == TZAssetModelMediaTypeVideo || model.type == TZAssetModelMediaTypePhotoGif)) {
580+ shouldDone = YES ;
581+ }
582+ if (shouldDone) {
583+ model.isSelected = YES ;
584+ [tzImagePickerVc addSelectedModel: model];
585+ [strongSelf doneButtonClick ];
586+ return ;
587+ }
582588 }
583589 strongCell.selectPhotoButton .selected = YES ;
584590 model.isSelected = YES ;
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ - (void)pushTZImagePickerController {
342342 cropView.layer.borderWidth = 2.0;
343343 }];*/
344344
345- // imagePickerVc.allowPreview = NO;
345+ // imagePickerVc.allowPreview = NO;
346346 // 自定义导航栏上的返回按钮
347347 /*
348348 [imagePickerVc setNavLeftBarButtonSettingBlock:^(UIButton *leftButton){
You can’t perform that action at this time.
0 commit comments