Commit de8eb2a9d0ed8979ca38ad02b417965462a8b784
1 parent
4d6a9367
提交_0.0.15_只对选着一张图做处理
Showing
3 changed files
with
4 additions
and
4 deletions
CNLiveImagePickerController.podspec
CNLiveImagePickerController/Classes/TZPhotoPickerController.m
| ... | ... | @@ -571,7 +571,7 @@ static CGFloat itemMargin = 5; |
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | - if (tzImagePickerVc.maxImagesCount == 1) { | |
| 574 | + if (tzImagePickerVc.maxImagesCount == 1 && tzImagePickerVc.allowPickingVideo == NO) { | |
| 575 | 575 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 576 | 576 | [tzImagePickerVc hideProgressHUD]; |
| 577 | 577 | [tzImagePickerVc hideAlertView:alertView]; | ... | ... |
Example/CNLiveImagePickerController/CNLiveViewController.m
| ... | ... | @@ -159,12 +159,12 @@ |
| 159 | 159 | |
| 160 | 160 | |
| 161 | 161 | |
| 162 | - TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:2 delegate:self]; | |
| 162 | + TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self]; | |
| 163 | 163 | imagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen; |
| 164 | 164 | imagePickerVc.allowTakePicture = NO; // 在内部显示拍照按钮 |
| 165 | 165 | imagePickerVc.allowPreview = NO; |
| 166 | 166 | imagePickerVc.allowPickingOriginalPhoto = NO; |
| 167 | - imagePickerVc.allowPickingVideo = NO; | |
| 167 | + imagePickerVc.allowPickingVideo = YES; | |
| 168 | 168 | |
| 169 | 169 | [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { |
| 170 | 170 | UIImage *image = photos.firstObject; | ... | ... |