Skip to content

Commit

Permalink
发布3.0.0版本,最低支持iOS8,更少代码更小体积
Browse files Browse the repository at this point in the history
  • Loading branch information
banchichen committed Aug 23, 2018
1 parent 9e8f7ec commit cf4b7b4
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 26 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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中的设置。
Expand Down Expand Up @@ -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 支持对共享相册和同步相册的显示
Expand Down
6 changes: 3 additions & 3 deletions TZImagePickerController.podspec
Original file line number Diff line number Diff line change
@@ -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" => "[email protected]" }
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}"
Expand Down
2 changes: 1 addition & 1 deletion TZImagePickerController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.2.6</string>
<string>3.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

/// Return YES if Authorized 返回YES如果得到了授权
- (BOOL)authorizationStatusAuthorized;
+ (NSInteger)authorizationStatus;
- (void)requestAuthorizationWithCompletion:(void (^)(void))completion;

/// Get Album 获得相册/相册数组
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(), ^{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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];
}

Expand Down
4 changes: 2 additions & 2 deletions TZImagePickerController/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}];
Expand Down
2 changes: 1 addition & 1 deletion TZImagePickerControllerFramework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.6</string>
<string>3.0.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit cf4b7b4

Please sign in to comment.