Commit de8eb2a9d0ed8979ca38ad02b417965462a8b784
1 parent
4d6a9367
提交_0.0.15_只对选着一张图做处理
Showing
3 changed files
with
4 additions
and
4 deletions
CNLiveImagePickerController.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveImagePickerController' | 10 | s.name = 'CNLiveImagePickerController' |
| 11 | - s.version = '0.0.14' | 11 | + s.version = '0.0.15' |
| 12 | s.summary = '相册' | 12 | s.summary = '相册' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveImagePickerController/Classes/TZPhotoPickerController.m
| @@ -571,7 +571,7 @@ static CGFloat itemMargin = 5; | @@ -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 | dispatch_async(dispatch_get_main_queue(), ^{ | 575 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 576 | [tzImagePickerVc hideProgressHUD]; | 576 | [tzImagePickerVc hideProgressHUD]; |
| 577 | [tzImagePickerVc hideAlertView:alertView]; | 577 | [tzImagePickerVc hideAlertView:alertView]; |
Example/CNLiveImagePickerController/CNLiveViewController.m
| @@ -159,12 +159,12 @@ | @@ -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 | imagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen; | 163 | imagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen; |
| 164 | imagePickerVc.allowTakePicture = NO; // 在内部显示拍照按钮 | 164 | imagePickerVc.allowTakePicture = NO; // 在内部显示拍照按钮 |
| 165 | imagePickerVc.allowPreview = NO; | 165 | imagePickerVc.allowPreview = NO; |
| 166 | imagePickerVc.allowPickingOriginalPhoto = NO; | 166 | imagePickerVc.allowPickingOriginalPhoto = NO; |
| 167 | - imagePickerVc.allowPickingVideo = NO; | 167 | + imagePickerVc.allowPickingVideo = YES; |
| 168 | 168 | ||
| 169 | [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { | 169 | [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { |
| 170 | UIImage *image = photos.firstObject; | 170 | UIImage *image = photos.firstObject; |