From cf4b7b42715dbc2fdf04824e68bc2667c7d31f52 Mon Sep 17 00:00:00 2001 From: "yuzheng.tz" Date: Thu, 23 Aug 2018 19:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=833.0.0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E6=9C=80=E4=BD=8E=E6=94=AF=E6=8C=81iOS8=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E5=B0=91=E4=BB=A3=E7=A0=81=E6=9B=B4=E5=B0=8F=E4=BD=93?= =?UTF-8?q?=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++--------- TZImagePickerController.podspec | 6 +++--- TZImagePickerController/Info.plist | 2 +- .../TZImagePickerController/TZImageManager.h | 1 - .../TZImagePickerController/TZImageManager.m | 6 +----- .../TZImagePickerController.h | 2 +- .../TZImagePickerController.m | 6 +++--- TZImagePickerController/ViewController.m | 4 ++-- TZImagePickerControllerFramework/Info.plist | 2 +- 9 files changed, 15 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 187f8e57..0ac88abe 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## 重要提示2:issue未说明下面必要情况的不予处理:1、我的demo是否正常? 2、你用的什么版本? 3、你的初始化TZImagePicker的代码 4、你是pod安装还是源码导入的?是否有改动TZImagePicker内部代码? - ## 重要提示3:1.9.0版本后移除了"prefs:root="的调用,这个API已经被列为私有API,请大家尽快升级。目前最新版本2.2.6 + ## 重要提示3:1.9.0版本后移除了"prefs:root="的调用,这个API已经被列为私有API,请大家尽快升级。 关于升级iOS10和Xcdoe8的提示: 在Xcode8环境下将项目运行在iOS10的设备/模拟器中,访问相册和相机需要额外配置info.plist文件。分别是Privacy - Photo Library Usage Description和Privacy - Camera Usage Description字段,详见Demo中info.plist中的设置。 @@ -120,28 +120,22 @@ A:视频导出分两步,第一步是通过PHAsset获取AVURLAsset,如是iC ## 六. Release Notes 最近更新 -2.2.6 新增needFixComposition属性,默认为NO,不再主动修正视频转向,防止部分安卓拍的视频导出失败 -2.2.5 修复minPhotoWidthSelectable不生效的问题, 使用@available消除警告 -2.1.8 优化gif图播放的体验,加入iCloud同步进度条;新增notScaleImage属性,设置为YES时内部不去缩放图片 -2.1.6 新增allowCameraLocation属性,默认为YES,置为NO时不会在照相/摄像时定位,修复一个序号紊乱的bug +**3.0.0 去除iOS6和7的适配代码,更轻量,最低支持iOS8** +2.2.6 新增needFixComposition属性,默认为NO,不再主动修正视频转向,防止部分安卓拍的视频导出失败(**最后一个支持iOS6和7的版本**) 2.1.5 修复开启showSelectedIndex后照片列表页iCloud图片进度条紊乱的bug 2.1.4 新增多个页面和组件的样式自定义block,允许自定义绝大多数UI样式 2.1.2 新增showPhotoCannotSelectLayer属性,当已选照片张数达到最大可选张数时,可像微信一样让其它照片显示一个提示不可选的浮层 2.1.1 新增是否显示图片选中序号的属性,优化一些细节 2.1.0.3 新增拍摄视频功能,优化一些细节 -2.0.1 修复一些bug 2.0.0.6 优化自定义languageBundle的支持,加入使用示例 2.0.0.5 优化性能,提高选择器打开速度,新增越南语支持 2.0.0.2 新增繁体语言,可设置首选语言,国际化支持更强大;优化一些细节 1.9.8 支持Carthage,优化一些细节 1.9.6 优化视频预览和gif预览页toolbar在iPhoneX上的样式 -1.9.5 优化视频导出API,和其它一些细节 -1.9.4 适配iPhoneX     1.9.0 移除"prefs:root="的调用,这个API已经被列为私有API,请大家尽快升级 ... 1.8.4 加入横竖屏适配;支持视频/gif多选;支持视频和照片一起选 1.8.1 新增2个代理方法,支持由上层来决定相册/照片的显示与否 -1.8.0 修复若干bug, 提升流畅度 ... 1.7.7 支持GIF图片的播放和选择 1.7.6 支持对共享相册和同步相册的显示 diff --git a/TZImagePickerController.podspec b/TZImagePickerController.podspec index 897d0c5a..92cab905 100644 --- a/TZImagePickerController.podspec +++ b/TZImagePickerController.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = "TZImagePickerController" - s.version = "2.2.6" + s.version = "3.0.0" s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video" s.homepage = "https://github.com/banchichen/TZImagePickerController" s.license = "MIT" s.author = { "banchichen" => "tanzhenios@foxmail.com" } s.platform = :ios - s.ios.deployment_target = "6.0" - s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "2.2.6" } + s.ios.deployment_target = "8.0" + s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.0.0" } s.requires_arc = true s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}" s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}" diff --git a/TZImagePickerController/Info.plist b/TZImagePickerController/Info.plist index aa399c3a..4cff5e5c 100644 --- a/TZImagePickerController/Info.plist +++ b/TZImagePickerController/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.6 + 3.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/TZImagePickerController/TZImagePickerController/TZImageManager.h b/TZImagePickerController/TZImagePickerController/TZImageManager.h index 4cfbb3af..ea37ac68 100755 --- a/TZImagePickerController/TZImagePickerController/TZImageManager.h +++ b/TZImagePickerController/TZImagePickerController/TZImageManager.h @@ -46,7 +46,6 @@ /// Return YES if Authorized 返回YES如果得到了授权 - (BOOL)authorizationStatusAuthorized; -+ (NSInteger)authorizationStatus; - (void)requestAuthorizationWithCompletion:(void (^)(void))completion; /// Get Album 获得相册/相册数组 diff --git a/TZImagePickerController/TZImagePickerController/TZImageManager.m b/TZImagePickerController/TZImagePickerController/TZImageManager.m index ab6b793d..8172d013 100755 --- a/TZImagePickerController/TZImagePickerController/TZImageManager.m +++ b/TZImagePickerController/TZImagePickerController/TZImageManager.m @@ -65,7 +65,7 @@ - (void)configTZScreenWidth { /// Return YES if Authorized 返回YES如果得到了授权 - (BOOL)authorizationStatusAuthorized { - NSInteger status = [self.class authorizationStatus]; + NSInteger status = [PHPhotoLibrary authorizationStatus]; if (status == 0) { /** * 当某些情况下AuthorizationStatus == AuthorizationStatusNotDetermined时,无法弹出系统首次使用的授权alertView,系统应用设置里亦没有相册的设置,此时将无法使用,故作以下操作,弹出系统首次使用的授权alertView @@ -76,10 +76,6 @@ - (BOOL)authorizationStatusAuthorized { return status == 3; } -+ (NSInteger)authorizationStatus { - return [PHPhotoLibrary authorizationStatus]; -} - - (void)requestAuthorizationWithCompletion:(void (^)(void))completion { void (^callCompletionBlock)(void) = ^(){ dispatch_async(dispatch_get_main_queue(), ^{ diff --git a/TZImagePickerController/TZImagePickerController/TZImagePickerController.h b/TZImagePickerController/TZImagePickerController/TZImagePickerController.h index ce426021..8f2d6750 100644 --- a/TZImagePickerController/TZImagePickerController/TZImagePickerController.h +++ b/TZImagePickerController/TZImagePickerController/TZImagePickerController.h @@ -4,7 +4,7 @@ // // Created by 谭真 on 15/12/24. // Copyright © 2015年 谭真. All rights reserved. -// version 2.2.6 - 2018.08.21 +// version 3.0.0 - 2018.08.23 // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController /* diff --git a/TZImagePickerController/TZImagePickerController/TZImagePickerController.m b/TZImagePickerController/TZImagePickerController/TZImagePickerController.m index d6c08a57..a2be4b2b 100644 --- a/TZImagePickerController/TZImagePickerController/TZImagePickerController.m +++ b/TZImagePickerController/TZImagePickerController/TZImagePickerController.m @@ -4,7 +4,7 @@ // // Created by 谭真 on 15/12/24. // Copyright © 2015年 谭真. All rights reserved. -// version 2.2.6 - 2018.08.21 +// version 3.0.0 - 2018.08.23 // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController #import "TZImagePickerController.h" @@ -195,7 +195,7 @@ - (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount columnNumber:(N [_settingBtn addTarget:self action:@selector(settingBtnClick) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:_settingBtn]; - if ([TZImageManager authorizationStatus] == 0) { + if ([PHPhotoLibrary authorizationStatus] == 0) { _timer = [NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(observeAuthrizationStatusChange) userInfo:nil repeats:NO]; } } else { @@ -364,7 +364,7 @@ - (void)setNeedFixComposition:(BOOL)needFixComposition { - (void)observeAuthrizationStatusChange { [_timer invalidate]; _timer = nil; - if ([TZImageManager authorizationStatus] == 0) { + if ([PHPhotoLibrary authorizationStatus] == 0) { _timer = [NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(observeAuthrizationStatusChange) userInfo:nil repeats:NO]; } diff --git a/TZImagePickerController/ViewController.m b/TZImagePickerController/ViewController.m index 2116c42f..ae6a0969 100644 --- a/TZImagePickerController/ViewController.m +++ b/TZImagePickerController/ViewController.m @@ -388,10 +388,10 @@ - (void)takePhoto { } }]; // 拍照之前还需要检查相册权限 - } else if ([TZImageManager authorizationStatus] == 2) { // 已被拒绝,没有相册权限,将无法保存拍的照片 + } else if ([PHPhotoLibrary authorizationStatus] == 2) { // 已被拒绝,没有相册权限,将无法保存拍的照片 UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法访问相册" message:@"请在iPhone的""设置-隐私-相册""中允许访问相册" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"设置", nil]; [alert show]; - } else if ([TZImageManager authorizationStatus] == 0) { // 未请求过相册权限 + } else if ([PHPhotoLibrary authorizationStatus] == 0) { // 未请求过相册权限 [[TZImageManager manager] requestAuthorizationWithCompletion:^{ [self takePhoto]; }]; diff --git a/TZImagePickerControllerFramework/Info.plist b/TZImagePickerControllerFramework/Info.plist index f28b2fe9..2351742e 100644 --- a/TZImagePickerControllerFramework/Info.plist +++ b/TZImagePickerControllerFramework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.6 + 3.0.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass