From b01b37d9444354ac0d02e2bfc03d2cc2767c7efc Mon Sep 17 00:00:00 2001 From: longitachi Date: Thu, 28 Apr 2022 14:56:36 +0800 Subject: [PATCH] Bumped version to 4.3.1 --- .github/ISSUE_TEMPLATE.MD | 2 +- CHANGELOG.md | 11 ++++++++++- README.md | 11 +++++++---- README_CN.md | 12 +++++++----- Sources/Camera/ZLCustomCamera.swift | 13 ++++++++----- Sources/General/ZLEditImageConfiguration.swift | 4 +++- Sources/General/ZLPhotoBrowser.swift | 2 +- ZLPhotoBrowser.podspec | 2 +- 8 files changed, 38 insertions(+), 19 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.MD b/.github/ISSUE_TEMPLATE.MD index 967f3f33..b3ba8880 100644 --- a/.github/ISSUE_TEMPLATE.MD +++ b/.github/ISSUE_TEMPLATE.MD @@ -5,7 +5,7 @@ Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue. #### Info - ZLPhotoBrowser version: e.g. 4.3.0 + ZLPhotoBrowser version: e.g. 4.3.1 Device: e.g. iPhone X Device version: e.g. iOS 14.0 Xcode version: e.g. Xcode 12.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index dd312e89..c448573b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,16 @@ ----- -## [4.3.0](https://github.com/longitachi/ZLPhotoBrowser/releases/tag/4.3.0) (2022-04-19) +## [4.3.1 - 4.3.0 Patch](https://github.com/longitachi/ZLPhotoBrowser/releases/tag/4.3.0) (2022-04-28) +### Add: +* Remove deprecated properties. +* Moved some UI related properties to ZLPhotoUIConfiguration. +* Add ZLEnlargeButton class instead of extending UIControl to enlarge button click area. +* Add fade animation when taking photos. + +--- + +## [4.3.0 - Beta](https://github.com/longitachi/ZLPhotoBrowser/releases/tag/4.3.0) (2022-04-19) ### Add: * Turkish supported.[#712](https://github.com/longitachi/ZLPhotoBrowser/pull/712) * Separate UI-related properties such as color, text, font, and image from ZLPhotoConfiguration and put them in ZLPhotoUIConfiguration. diff --git a/README.md b/README.md index 2f3b0445..5634e94a 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,13 @@ If you only want to use the image edit feature, please move to [ZLImageEditor](h ### Change Log > [More logs](https://github.com/longitachi/ZLPhotoBrowser/blob/master/CHANGELOG.md) ``` -● 4.3.0 +● 4.3.1 - 4.3.0 Patch + Add: + Remove deprecated properties. + Moved some UI related properties to ZLPhotoUIConfiguration. + Add ZLEnlargeButton class instead of extending UIControl to enlarge button click area. + Add fade animation when taking photos. +● 4.3.0 - Beta Add: Turkish supported. Separate UI-related properties such as color, text, font, and image from ZLPhotoConfiguration and put them in ZLPhotoUIConfiguration. @@ -102,9 +108,6 @@ If you only want to use the image edit feature, please move to [ZLImageEditor](h ● 4.2.5 Fix: Fix the bug of failing to archive with Xcode 13.3. -● 4.2.4 - Fix: - Fixes the bug when select the original photo in the preview. ... ``` diff --git a/README_CN.md b/README_CN.md index a42431c5..03cb2886 100644 --- a/README_CN.md +++ b/README_CN.md @@ -102,11 +102,16 @@ ZLPhotoBrowser是一款微信样式的图片选择器,支持预览/相册内 ### 更新日志 > [更多更新日志](https://github.com/longitachi/ZLPhotoBrowser/blob/master/CHANGELOG.md) ``` -● 4.3.0 +● 4.3.1 - 4.3.0 Patch + Add: + 删除已废弃的属性(图片编辑配置相关); + 从ZLPhotoConfiguration中将部分UI相关的属性移动到ZLPhotoUIConfiguration中; + 添加UIButton子类ZLEnlargeButton替代之前的UIControl扩展,来增加按钮的点击范围; + 拍照时新增一个fade动画; +● 4.3.0 - Beta Add: 支持土耳其语; 从ZLPhotoConfiguration类中,将自定义颜色、文案、字体、图片拆分出来,放到新的类ZLPhotoUIConfiguration中; - 将类 'ZLPhotoThemeColorDeploy' 更名为 'ZLPhotoColorConfiguration'; 编辑图片工具类中新增部分属性以支持OC调用; 新增部分UI支持自定义color; ZLImagePreviewController 中添加长按事件回调; @@ -114,9 +119,6 @@ ZLPhotoBrowser是一款微信样式的图片选择器,支持预览/相册内 ● 4.2.5 Fix: 修复用Xcode13.3打包失败的bug; -● 4.2.4 - Fix: - 修复预览界面选择原图功能相关的bug; ... ``` diff --git a/Sources/Camera/ZLCustomCamera.swift b/Sources/Camera/ZLCustomCamera.swift index 9dc666fe..24bb9694 100644 --- a/Sources/Camera/ZLCustomCamera.swift +++ b/Sources/Camera/ZLCustomCamera.swift @@ -157,8 +157,6 @@ open class ZLCustomCamera: UIViewController, CAAnimationDelegate { return } - self.observerDeviceMotion() - AVCaptureDevice.requestAccess(for: .video) { (videoGranted) in guard videoGranted else { ZLMainAsync(after: 1) { @@ -200,6 +198,11 @@ open class ZLCustomCamera: UIViewController, CAAnimationDelegate { } } + open override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + observerDeviceMotion() + } + open override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if !UIImagePickerController.isSourceTypeAvailable(.camera) { @@ -391,9 +394,9 @@ open class ZLCustomCamera: UIViewController, CAAnimationDelegate { self.motionManager?.deviceMotionUpdateInterval = 0.5 if self.motionManager?.isDeviceMotionAvailable == true { - self.motionManager?.startDeviceMotionUpdates(to: OperationQueue.main, withHandler: { (motion, error) in - if let _ = motion { - self.handleDeviceMotion(motion!) + self.motionManager?.startDeviceMotionUpdates(to: .main, withHandler: { (motion, error) in + if let motion = motion { + self.handleDeviceMotion(motion) } }) } else { diff --git a/Sources/General/ZLEditImageConfiguration.swift b/Sources/General/ZLEditImageConfiguration.swift index 2c770abd..c29c9d21 100644 --- a/Sources/General/ZLEditImageConfiguration.swift +++ b/Sources/General/ZLEditImageConfiguration.swift @@ -24,7 +24,9 @@ import UIKit -@objc public protocol ZLImageStickerContainerDelegate where Self: UIView { +/// Provide an image sticker container view that conform to this protocol must be a subclass of UIView +/// 必须是UIView的子类遵循这个协议 +@objc public protocol ZLImageStickerContainerDelegate { @objc var selectImageBlock: ((UIImage) -> Void)? { get set } diff --git a/Sources/General/ZLPhotoBrowser.swift b/Sources/General/ZLPhotoBrowser.swift index b9f67804..90b1e802 100644 --- a/Sources/General/ZLPhotoBrowser.swift +++ b/Sources/General/ZLPhotoBrowser.swift @@ -24,4 +24,4 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -let version = "4.3.0" +let version = "4.3.1" diff --git a/ZLPhotoBrowser.podspec b/ZLPhotoBrowser.podspec index 8eebfb98..4f7377f2 100644 --- a/ZLPhotoBrowser.podspec +++ b/ZLPhotoBrowser.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ZLPhotoBrowser' - s.version = '4.3.0' + s.version = '4.3.1' s.summary = 'A lightweight and pure Swift implemented library for select photos from album' s.description = <<-DESC