Commit 0888ed27 authored by yuzheng's avatar yuzheng

相册内无照片时给出提示,发布3.1.4版本

parent d9ffab87
...@@ -133,6 +133,7 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能 ...@@ -133,6 +133,7 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能
## 六. Release Notes 最近更新 ## 六. Release Notes 最近更新
3.1.4 相册内无照片时给出提示
3.1.3 适配阿拉伯等语言下从右往左布局的特性 3.1.3 适配阿拉伯等语言下从右往左布局的特性
3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案 3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案
**3.0.7 适配iPhoneXR、XS、XS Max,建议大家尽快更新** **3.0.7 适配iPhoneXR、XS、XS Max,建议大家尽快更新**
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "TZImagePickerController" s.name = "TZImagePickerController"
s.version = "3.1.3" s.version = "3.1.4"
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video" s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
s.homepage = "https://github.com/banchichen/TZImagePickerController" s.homepage = "https://github.com/banchichen/TZImagePickerController"
s.license = "MIT" s.license = "MIT"
s.author = { "banchichen" => "tanzhenios@foxmail.com" } s.author = { "banchichen" => "tanzhenios@foxmail.com" }
s.platform = :ios s.platform = :ios
s.ios.deployment_target = "8.0" s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.1.3" } s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.1.4" }
s.requires_arc = true s.requires_arc = true
s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}" s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}"
s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}" s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.1.3</string> <string>3.1.4</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -142,9 +142,9 @@ static dispatch_once_t onceToken; ...@@ -142,9 +142,9 @@ static dispatch_once_t onceToken;
// 有可能是PHCollectionList类的的对象,过滤掉 // 有可能是PHCollectionList类的的对象,过滤掉
if (![collection isKindOfClass:[PHAssetCollection class]]) continue; if (![collection isKindOfClass:[PHAssetCollection class]]) continue;
// 过滤空相册 // 过滤空相册
if (collection.estimatedAssetCount <= 0) continue; if (collection.estimatedAssetCount <= 0 && ![self isCameraRollAlbum:collection]) continue;
PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:collection options:option]; PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:collection options:option];
if (fetchResult.count < 1) continue; if (fetchResult.count < 1 && ![self isCameraRollAlbum:collection]) continue;
if ([self.pickerDelegate respondsToSelector:@selector(isAlbumCanSelect:result:)]) { if ([self.pickerDelegate respondsToSelector:@selector(isAlbumCanSelect:result:)]) {
if (![self.pickerDelegate isAlbumCanSelect:collection.localizedTitle result:fetchResult]) { if (![self.pickerDelegate isAlbumCanSelect:collection.localizedTitle result:fetchResult]) {
...@@ -161,7 +161,9 @@ static dispatch_once_t onceToken; ...@@ -161,7 +161,9 @@ static dispatch_once_t onceToken;
} }
} }
} }
if (completion && albumArr.count > 0) completion(albumArr); if (completion) {
completion(albumArr);
}
} }
#pragma mark - Get Assets #pragma mark - Get Assets
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"Preview" = "Xem trước"; "Preview" = "Xem trước";
"Full image" = "Hình gốc"; "Full image" = "Hình gốc";
"Processing..." = "Đang xử lý..."; "Processing..." = "Đang xử lý...";
"No Photos or Videos" = "Không có ảnh hoặc video";
"Can not use camera" = "Máy chụp hình không khả dụng"; "Can not use camera" = "Máy chụp hình không khả dụng";
"Synchronizing photos from iCloud" = "Đang đồng bộ hình ảnh từ ICloud"; "Synchronizing photos from iCloud" = "Đang đồng bộ hình ảnh từ ICloud";
"Can not choose both video and photo" = "Trong lúc chọn hình ảnh không cùng lúc chọn video"; "Can not choose both video and photo" = "Trong lúc chọn hình ảnh không cùng lúc chọn video";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 3.1.3 - 2018.11.22 // version 3.1.4 - 2018.11.26
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
/* /*
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 3.1.3 - 2018.11.22 // version 3.1.4 - 2018.11.26
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
#import "TZImagePickerController.h" #import "TZImagePickerController.h"
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
@property CGRect previousPreheatRect; @property CGRect previousPreheatRect;
@property (nonatomic, assign) BOOL isSelectOriginalPhoto; @property (nonatomic, assign) BOOL isSelectOriginalPhoto;
@property (nonatomic, strong) TZCollectionView *collectionView; @property (nonatomic, strong) TZCollectionView *collectionView;
@property (nonatomic, strong) UILabel *noDataLabel;
@property (strong, nonatomic) UICollectionViewFlowLayout *layout; @property (strong, nonatomic) UICollectionViewFlowLayout *layout;
@property (nonatomic, strong) UIImagePickerController *imagePickerVc; @property (nonatomic, strong) UIImagePickerController *imagePickerVc;
@property (strong, nonatomic) CLLocation *location; @property (strong, nonatomic) CLLocation *location;
...@@ -166,6 +167,15 @@ static CGFloat itemMargin = 5; ...@@ -166,6 +167,15 @@ static CGFloat itemMargin = 5;
_collectionView.contentSize = CGSizeMake(self.view.tz_width, ((_model.count + self.columnNumber) / self.columnNumber) * self.view.tz_width); _collectionView.contentSize = CGSizeMake(self.view.tz_width, ((_model.count + self.columnNumber) / self.columnNumber) * self.view.tz_width);
} else { } else {
_collectionView.contentSize = CGSizeMake(self.view.tz_width, ((_model.count + self.columnNumber - 1) / self.columnNumber) * self.view.tz_width); _collectionView.contentSize = CGSizeMake(self.view.tz_width, ((_model.count + self.columnNumber - 1) / self.columnNumber) * self.view.tz_width);
if (_models.count == 0) {
_noDataLabel = [UILabel new];
_noDataLabel.textAlignment = NSTextAlignmentCenter;
_noDataLabel.text = [NSBundle tz_localizedStringForKey:@"No Photos or Videos"];
CGFloat rgb = 153 / 256.0;
_noDataLabel.textColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:1.0];
_noDataLabel.font = [UIFont boldSystemFontOfSize:20];
[_collectionView addSubview:_noDataLabel];
}
} }
[self.view addSubview:_collectionView]; [self.view addSubview:_collectionView];
[_collectionView registerClass:[TZAssetCell class] forCellWithReuseIdentifier:@"TZAssetCell"]; [_collectionView registerClass:[TZAssetCell class] forCellWithReuseIdentifier:@"TZAssetCell"];
...@@ -293,6 +303,7 @@ static CGFloat itemMargin = 5; ...@@ -293,6 +303,7 @@ static CGFloat itemMargin = 5;
collectionViewHeight = tzImagePickerVc.showSelectBtn ? self.view.tz_height - toolBarHeight : self.view.tz_height; collectionViewHeight = tzImagePickerVc.showSelectBtn ? self.view.tz_height - toolBarHeight : self.view.tz_height;
} }
_collectionView.frame = CGRectMake(0, top, self.view.tz_width, collectionViewHeight); _collectionView.frame = CGRectMake(0, top, self.view.tz_width, collectionViewHeight);
_noDataLabel.frame = _collectionView.bounds;
CGFloat itemWH = (self.view.tz_width - (self.columnNumber + 1) * itemMargin) / self.columnNumber; CGFloat itemWH = (self.view.tz_width - (self.columnNumber + 1) * itemMargin) / self.columnNumber;
_layout.itemSize = CGSizeMake(itemWH, itemWH); _layout.itemSize = CGSizeMake(itemWH, itemWH);
_layout.minimumInteritemSpacing = itemMargin; _layout.minimumInteritemSpacing = itemMargin;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.1.3</string> <string>3.1.4</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment