Skip to content

Commit d578bee

Browse files
author
yuzheng
committed
强壮裁剪相关判断;发布3.0.8版本
1 parent e455733 commit d578bee

7 files changed

Lines changed: 11 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ A:视频导出分两步,第一步是通过PHAsset获取AVURLAsset,如是iC
128128

129129
## 六. Release Notes 最近更新
130130

131+
3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案
131132
**3.0.7 适配iPhoneXR、XS、XS Max,建议大家尽快更新**
132133
3.0.6 优化保存照片、视频的方法
133134
3.0.1 新增对[TZImagePreviewController](https://github.com/banchichen/TZImagePreviewController)库的支持,允许预览UIImage、NSURL、PHAsset对象

TZImagePickerController.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Pod::Spec.new do |s|
22
s.name = "TZImagePickerController"
3-
s.version = "3.0.7"
3+
s.version = "3.0.8"
44
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
55
s.homepage = "https://github.com/banchichen/TZImagePickerController"
66
s.license = "MIT"
77
s.author = { "banchichen" => "tanzhenios@foxmail.com" }
88
s.platform = :ios
99
s.ios.deployment_target = "8.0"
10-
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.0.7" }
10+
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.0.8" }
1111
s.requires_arc = true
1212
s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}"
1313
s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}"

TZImagePickerController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.0.7</string>
18+
<string>3.0.8</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

TZImagePickerController/TZImagePickerController/TZImagePickerController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Created by 谭真 on 15/12/24.
66
// Copyright © 2015年 谭真. All rights reserved.
7-
// version 3.0.7 - 2018.09.13
7+
// version 3.0.8 - 2018.09.27
88
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
99

1010
/*

TZImagePickerController/TZImagePickerController/TZImagePickerController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Created by 谭真 on 15/12/24.
66
// Copyright © 2015年 谭真. All rights reserved.
7-
// version 3.0.7 - 2018.09.13
7+
// version 3.0.8 - 2018.09.27
88
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
99

1010
#import "TZImagePickerController.h"

TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ - (void)configCollectionView {
206206

207207
- (void)configCropView {
208208
TZImagePickerController *_tzImagePickerVc = (TZImagePickerController *)self.navigationController;
209-
if (_tzImagePickerVc.maxImagesCount <= 1 && _tzImagePickerVc.allowCrop) {
209+
if (_tzImagePickerVc.maxImagesCount <= 1 && _tzImagePickerVc.allowCrop && _tzImagePickerVc.allowPickingImage) {
210210
[_cropView removeFromSuperview];
211211
[_cropBgView removeFromSuperview];
212212

@@ -381,11 +381,11 @@ - (void)doneButtonClick {
381381
TZAssetModel *model = _models[_currentIndex];
382382
[_tzImagePickerVc addSelectedModel:model];
383383
}
384-
if (_tzImagePickerVc.allowCrop) { // 裁剪状态
384+
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:_currentIndex inSection:0];
385+
TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath];
386+
if (_tzImagePickerVc.allowCrop && [cell isKindOfClass:[TZPhotoPreviewCell class]]) { // 裁剪状态
385387
_doneButton.enabled = NO;
386388
[_tzImagePickerVc showProgressHUD];
387-
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:_currentIndex inSection:0];
388-
TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath];
389389
UIImage *cropedImage = [TZImageCropManager cropImageView:cell.previewView.imageView toRect:_tzImagePickerVc.cropRect zoomScale:cell.previewView.scrollView.zoomScale containerView:self.view];
390390
if (_tzImagePickerVc.needCircleCrop) {
391391
cropedImage = [TZImageCropManager circularClipImage:cropedImage];

TZImagePickerControllerFramework/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.0.7</string>
18+
<string>3.0.8</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

0 commit comments

Comments
 (0)