Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoLayout布局,适配阿拉伯本地化的问题 #1339

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion TZImagePickerController.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TZImagePickerController"
s.version = "3.8.3"
s.version = "3.8.3.1"
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
s.homepage = "https://github.com/banchichen/TZImagePickerController"
s.license = "MIT"
Expand Down
12 changes: 10 additions & 2 deletions TZImagePickerController.xcodeproj/project.pbxproj
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
47651C4429B9CDD900B16480 /* TZCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 47651C4329B9CDD900B16480 /* TZCollectionViewFlowLayout.m */; };
47651C4529B9CEBB00B16480 /* TZCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 47651C4329B9CDD900B16480 /* TZCollectionViewFlowLayout.m */; };
570A348C26D7275C000EEF2E /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570A348B26D7275C000EEF2E /* Photos.framework */; };
570A348E26D72762000EEF2E /* PhotosUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570A348D26D72762000EEF2E /* PhotosUI.framework */; };
570A349026D72768000EEF2E /* PhotosUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570A348F26D72768000EEF2E /* PhotosUI.framework */; };
Expand Down Expand Up @@ -122,6 +124,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
47651C4229B9CDD900B16480 /* TZCollectionViewFlowLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TZCollectionViewFlowLayout.h; sourceTree = "<group>"; };
47651C4329B9CDD900B16480 /* TZCollectionViewFlowLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TZCollectionViewFlowLayout.m; sourceTree = "<group>"; };
570A348B26D7275C000EEF2E /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Photos.framework; sourceTree = DEVELOPER_DIR; };
570A348D26D72762000EEF2E /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/iOSSupport/System/Library/Frameworks/PhotosUI.framework; sourceTree = DEVELOPER_DIR; };
570A348F26D72768000EEF2E /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = System/Library/Frameworks/PhotosUI.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -369,6 +373,8 @@
9005E2B1257A462E002A8682 /* UIView+TZLayout.m */,
6D5358CB1D64600F00928CC6 /* NSBundle+TZImagePicker.h */,
6D5358CC1D64600F00928CC6 /* NSBundle+TZImagePicker.m */,
47651C4229B9CDD900B16480 /* TZCollectionViewFlowLayout.h */,
47651C4329B9CDD900B16480 /* TZCollectionViewFlowLayout.m */,
6DC358641CC8BAE300898D29 /* Resources */,
);
path = TZImagePickerController;
Expand Down Expand Up @@ -631,6 +637,7 @@
B606A9C4265FD53200F5493E /* TZVideoCropController.m in Sources */,
901F2296215CABD600F604ED /* FLAnimatedImageView.m in Sources */,
9019FD8D21EC25D7009ADEAE /* TZImageUploadOperation.m in Sources */,
47651C4429B9CDD900B16480 /* TZCollectionViewFlowLayout.m in Sources */,
900E65811C2BB8D5003D9A9E /* main.m in Sources */,
900EF0121C2C107400EA709B /* TZPhotoPreviewController.m in Sources */,
901CC3FC21CB758500C55443 /* TZImageRequestOperation.m in Sources */,
Expand Down Expand Up @@ -674,6 +681,7 @@
9F763A5C1FA072E500D9E526 /* TZVideoPlayerController.m in Sources */,
9F763A5E1FA072E500D9E526 /* TZGifPhotoPreviewController.m in Sources */,
9F763A601FA072E500D9E526 /* TZProgressView.m in Sources */,
47651C4529B9CEBB00B16480 /* TZCollectionViewFlowLayout.m in Sources */,
908D11592887ED8000DD212E /* TZLocationManager.m in Sources */,
9F763A621FA072E500D9E526 /* TZImageManager.m in Sources */,
9F763A641FA072E500D9E526 /* TZImageCropManager.m in Sources */,
Expand Down Expand Up @@ -852,7 +860,7 @@
INFOPLIST_FILE = TZImagePickerController/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.8.3;
MARKETING_VERSION = 3.8.3.1;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2022.TZImagePickerController.www;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand All @@ -877,7 +885,7 @@
INFOPLIST_FILE = TZImagePickerController/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.8.3;
MARKETING_VERSION = 3.8.3.1;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2022.TZImagePickerController.www;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down
Expand Up @@ -44,7 +44,7 @@ typedef enum : NSUInteger {
@class TZAlbumModel;
@interface TZAlbumCell : UITableViewCell
@property (nonatomic, strong) TZAlbumModel *model;
@property (weak, nonatomic) UIButton *selectedCountButton;
@property (strong, nonatomic) UIButton *selectedCountButton;

@property (nonatomic, copy) void (^albumCellDidSetModelBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
@property (nonatomic, copy) void (^albumCellDidLayoutSubviewsBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
Expand Down
44 changes: 34 additions & 10 deletions TZImagePickerController/TZImagePickerController/TZAssetCell.m
Expand Up @@ -394,8 +394,8 @@ - (void)dealloc {
@end

@interface TZAlbumCell ()
@property (weak, nonatomic) UIImageView *posterImageView;
@property (weak, nonatomic) UILabel *titleLabel;
@property (strong, nonatomic) UIImageView *posterImageView;
@property (strong, nonatomic) UILabel *titleLabel;
@end

@implementation TZAlbumCell
Expand All @@ -404,9 +404,37 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
self.backgroundColor = [UIColor whiteColor];
self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
[self setupUI];
return self;
}

- (void)setupUI{
[self.contentView addSubview:self.posterImageView];
NSLayoutConstraint *posterImage_left = [NSLayoutConstraint constraintWithItem:self.posterImageView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeading multiplier:1.0 constant:0];
NSLayoutConstraint *posterImage_centerY = [NSLayoutConstraint constraintWithItem:self.posterImageView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0];
NSLayoutConstraint *posterImage_width = [NSLayoutConstraint constraintWithItem:self.posterImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0.0 constant:70];
NSLayoutConstraint *posterImage_height = [NSLayoutConstraint constraintWithItem:self.posterImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0.0 constant:70];
[self.contentView addConstraints:@[posterImage_left,posterImage_centerY]];
[self.posterImageView addConstraints:@[posterImage_width,posterImage_height]];


[self.contentView addSubview:self.titleLabel];
NSLayoutConstraint *titleLabel_left = [NSLayoutConstraint constraintWithItem:self.titleLabel attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.posterImageView attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:10];
NSLayoutConstraint *titleLabel_centerY = [NSLayoutConstraint constraintWithItem:self.titleLabel attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.posterImageView attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0];
NSLayoutConstraint *titleLabel_right = [NSLayoutConstraint constraintWithItem:self.titleLabel attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:-50];
[self.contentView addConstraints:@[titleLabel_left,titleLabel_centerY,titleLabel_right]];


[self.contentView addSubview:self.selectedCountButton];
NSLayoutConstraint *selectedCountButton_centerY = [NSLayoutConstraint constraintWithItem:self.selectedCountButton attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.posterImageView attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0];
NSLayoutConstraint *selectedCountButton_right = [NSLayoutConstraint constraintWithItem:self.selectedCountButton attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:-5];
NSLayoutConstraint *selectedCountButton_width = [NSLayoutConstraint constraintWithItem:self.selectedCountButton attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0.0 constant:24];
NSLayoutConstraint *selectedCountButton_height = [NSLayoutConstraint constraintWithItem:self.selectedCountButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:0.0 constant:24];
[self.contentView addConstraints:@[selectedCountButton_centerY,selectedCountButton_right]];
[self.selectedCountButton addConstraints:@[selectedCountButton_width,selectedCountButton_height]];

}

- (void)setModel:(TZAlbumModel *)model {
_model = model;

Expand Down Expand Up @@ -436,10 +464,6 @@ - (void)setModel:(TZAlbumModel *)model {

- (void)layoutSubviews {
[super layoutSubviews];
_selectedCountButton.frame = CGRectMake(self.contentView.tz_width - 24, 23, 24, 24);
NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight);
self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight);
self.posterImageView.frame = CGRectMake(0, 0, 70, 70);

if (self.albumCellDidLayoutSubviewsBlock) {
self.albumCellDidLayoutSubviewsBlock(self, _posterImageView, _titleLabel);
Expand All @@ -457,7 +481,7 @@ - (UIImageView *)posterImageView {
UIImageView *posterImageView = [[UIImageView alloc] init];
posterImageView.contentMode = UIViewContentModeScaleAspectFill;
posterImageView.clipsToBounds = YES;
[self.contentView addSubview:posterImageView];
posterImageView.translatesAutoresizingMaskIntoConstraints = NO;
_posterImageView = posterImageView;
}
return _posterImageView;
Expand All @@ -467,13 +491,13 @@ - (UILabel *)titleLabel {
if (_titleLabel == nil) {
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:17];
titleLabel.textAlignment = NSTextAlignmentNatural;
titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
if (@available(iOS 13.0, *)) {
titleLabel.textColor = UIColor.labelColor;
} else {
titleLabel.textColor = [UIColor blackColor];
}
titleLabel.textAlignment = NSTextAlignmentLeft;
[self.contentView addSubview:titleLabel];
_titleLabel = titleLabel;
}
return _titleLabel;
Expand All @@ -488,7 +512,7 @@ - (UIButton *)selectedCountButton {
selectedCountButton.backgroundColor = [UIColor redColor];
[selectedCountButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
selectedCountButton.titleLabel.font = [UIFont systemFontOfSize:15];
[self.contentView addSubview:selectedCountButton];
selectedCountButton.translatesAutoresizingMaskIntoConstraints = NO;
_selectedCountButton = selectedCountButton;
}
return _selectedCountButton;
Expand Down
@@ -0,0 +1,17 @@
//
// TZCollectionViewFlowLayout.h
// TZImagePickerController
//
// Created by Sir 姚 on 2023/3/9.
// Copyright © 2023 谭真. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface TZCollectionViewFlowLayout : UICollectionViewFlowLayout

@end

NS_ASSUME_NONNULL_END
@@ -0,0 +1,16 @@
//
// TZCollectionViewFlowLayout.m
// TZImagePickerController
//
// Created by Sir 姚 on 2023/3/9.
// Copyright © 2023 谭真. All rights reserved.
//

#import "TZCollectionViewFlowLayout.h"

@implementation TZCollectionViewFlowLayout

- (BOOL)flipsHorizontallyInOppositeLayoutDirection{
return YES;
}
@end
Expand Up @@ -68,27 +68,31 @@ - (void)configPreviewView {
}

- (void)configBottomToolBar {
_toolBar = [[UIView alloc] initWithFrame:CGRectZero];
_toolBar = [[UIView alloc] init];
_toolBar.translatesAutoresizingMaskIntoConstraints = NO;
CGFloat rgb = 34 / 255.0;
_toolBar.backgroundColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:0.7];

_doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
_doneButton.titleLabel.font = [UIFont systemFontOfSize:16];
_doneButton.translatesAutoresizingMaskIntoConstraints = NO;
[_doneButton addTarget:self action:@selector(doneButtonClick) forControlEvents:UIControlEventTouchUpInside];
TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
if (tzImagePickerVc) {
[_doneButton setTitle:tzImagePickerVc.doneBtnTitleStr forState:UIControlStateNormal];
[_doneButton setTitleColor:tzImagePickerVc.oKButtonTitleColorNormal forState:UIControlStateNormal];
_doneButton.titleLabel.font = tzImagePickerVc.doneBtnTitleFont;
} else {
[_doneButton setTitle:[NSBundle tz_localizedStringForKey:@"Done"] forState:UIControlStateNormal];
[_doneButton setTitleColor:[UIColor colorWithRed:(83/255.0) green:(179/255.0) blue:(17/255.0) alpha:1.0] forState:UIControlStateNormal];
_doneButton.titleLabel.font = [UIFont systemFontOfSize:16];
}
[_toolBar addSubview:_doneButton];

UILabel *byteLabel = [[UILabel alloc] init];
byteLabel.textColor = [UIColor whiteColor];
byteLabel.textAlignment = NSTextAlignmentNatural;
byteLabel.font = [UIFont systemFontOfSize:13];
byteLabel.frame = CGRectMake(10, 0, 100, 44);
byteLabel.translatesAutoresizingMaskIntoConstraints = NO;
[[TZImageManager manager] getPhotosBytesWithArray:@[_model] completion:^(NSString *totalBytes) {
byteLabel.text = totalBytes;
}];
Expand All @@ -99,6 +103,27 @@ - (void)configBottomToolBar {
if (tzImagePickerVc.gifPreviewPageUIConfigBlock) {
tzImagePickerVc.gifPreviewPageUIConfigBlock(_toolBar, _doneButton);
}

CGFloat toolBarHeight = [TZCommonTools tz_isIPhoneX] ? 44 + (83 - 49) : 44;

NSLayoutConstraint *toolBar_left = [NSLayoutConstraint constraintWithItem:_toolBar attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeading multiplier:1.0 constant:0];
NSLayoutConstraint *toolBar_right = [NSLayoutConstraint constraintWithItem:_toolBar attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:0];
NSLayoutConstraint *toolBar_bottom = [NSLayoutConstraint constraintWithItem:_toolBar attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
NSLayoutConstraint *toolBar_height = [NSLayoutConstraint constraintWithItem:_toolBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:toolBarHeight];
[self.view addConstraints:@[toolBar_left,toolBar_right,toolBar_bottom]];
[_toolBar addConstraints:@[toolBar_height]];

NSLayoutConstraint *doneButton_right = [NSLayoutConstraint constraintWithItem:_doneButton attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:_toolBar attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:-12];
NSLayoutConstraint *doneButton_top = [NSLayoutConstraint constraintWithItem:_doneButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_toolBar attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
NSLayoutConstraint *doneButton_height = [NSLayoutConstraint constraintWithItem:_doneButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:44];
[_toolBar addConstraints:@[doneButton_right,doneButton_top]];
[_doneButton addConstraint:doneButton_height];

NSLayoutConstraint *byteLabel_left = [NSLayoutConstraint constraintWithItem:byteLabel attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:_toolBar attribute:NSLayoutAttributeLeading multiplier:1.0 constant:10];
NSLayoutConstraint *byteLabel_top = [NSLayoutConstraint constraintWithItem:byteLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_toolBar attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
NSLayoutConstraint *byteLabel_height = [NSLayoutConstraint constraintWithItem:byteLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:44];
[_toolBar addConstraints:@[byteLabel_left,byteLabel_top]];
[byteLabel addConstraints:@[byteLabel_height]];
}

- (UIStatusBarStyle)preferredStatusBarStyle {
Expand All @@ -116,10 +141,10 @@ - (void)viewDidLayoutSubviews {

_previewView.frame = self.view.bounds;
_previewView.scrollView.frame = self.view.bounds;
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
[_doneButton sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
// CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
// _toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
// [_doneButton sizeToFit];
// _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);

TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
if (tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock) {
Expand Down
Expand Up @@ -163,10 +163,12 @@ - (void)getAllAlbumsWithFetchAssets:(BOOL)needFetchAssets completion:(void (^)(N
// 我的照片流 1.6.10重新加入..
PHFetchResult *myPhotoStreamAlbum = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumMyPhotoStream options:nil];
PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
PHFetchResult *topLevelUserCollections = [PHCollectionList fetchTopLevelUserCollectionsWithOptions:nil];
// PHFetchResult *topLevelUserCollections = [PHCollectionList fetchTopLevelUserCollectionsWithOptions:nil];
PHFetchResult *syncedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:nil];
PHFetchResult *sharedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumCloudShared options:nil];
NSArray *allAlbums = @[myPhotoStreamAlbum,smartAlbums,topLevelUserCollections,syncedAlbums,sharedAlbums];
// 用户的创建的文件夹相册
PHFetchResult *userFolderAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
NSArray *allAlbums = @[myPhotoStreamAlbum,smartAlbums,syncedAlbums,sharedAlbums,userFolderAlbums];
for (PHFetchResult *fetchResult in allAlbums) {
for (PHAssetCollection *collection in fetchResult) {
// 有可能是PHCollectionList类的的对象,过滤掉
Expand Down