Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dz_TZImagePickerController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuijing
dz_TZImagePickerController
Commits
673dbcf6
Unverified
Commit
673dbcf6
authored
May 03, 2018
by
张贵广
Committed by
GitHub
May 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
建议修改相册过滤的判断条件
既然这个库准备提供国际化的功能,判断相册类型就不要使用中文或英文字符对比的方式了,应该使用枚举类型来判断。
parent
fb2980d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+7
-2
No files found.
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
673dbcf6
...
@@ -191,8 +191,9 @@ static dispatch_once_t onceToken;
...
@@ -191,8 +191,9 @@ static dispatch_once_t onceToken;
}
}
}
}
if
([
collection
.
localizedTitle
tz_containsString
:
@"Hidden"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"已隐藏"
])
continue
;
// 判断相册类型建议不要使用字符串判断,不然只能在中文和英文环境下能用了
if
([
collection
.
localizedTitle
tz_containsString
:
@"Deleted"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"最近删除"
])
continue
;
if
(
collection
.
assetCollectionSubtype
==
PHAssetCollectionSubtypeSmartAlbumAllHidden
)
continue
;
// 『已隐藏』相册
if
(
collection
.
assetCollectionSubtype
==
1000000201
)
continue
;
// 『最近删除』相册
if
([
self
isCameraRollAlbum
:
collection
])
{
if
([
self
isCameraRollAlbum
:
collection
])
{
[
albumArr
insertObject
:[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
isCameraRoll
:
YES
needFetchAssets
:
needFetchAssets
]
atIndex
:
0
];
[
albumArr
insertObject
:[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
isCameraRoll
:
YES
needFetchAssets
:
needFetchAssets
]
atIndex
:
0
];
}
else
{
}
else
{
...
@@ -218,6 +219,10 @@ static dispatch_once_t onceToken;
...
@@ -218,6 +219,10 @@ static dispatch_once_t onceToken;
if
([
self
isCameraRollAlbum
:
group
])
{
if
([
self
isCameraRollAlbum
:
group
])
{
[
albumArr
insertObject
:[
self
modelWithResult
:
group
name
:
name
isCameraRoll
:
YES
needFetchAssets
:
needFetchAssets
]
atIndex
:
0
];
[
albumArr
insertObject
:[
self
modelWithResult
:
group
name
:
name
isCameraRoll
:
YES
needFetchAssets
:
needFetchAssets
]
atIndex
:
0
];
}
else
if
([
name
isEqualToString
:
@"My Photo Stream"
]
||
[
name
isEqualToString
:
@"我的照片流"
])
{
}
else
if
([
name
isEqualToString
:
@"My Photo Stream"
]
||
[
name
isEqualToString
:
@"我的照片流"
])
{
// 这里也不建议使用字符串判断,
// 貌似应该使用 [group valueForProperty:ALAssetsGroupPropertyType] == *特定值*
// 具体的值我并不知道,因为已经找不到iOS8.0以下的手机或模拟器来调试了
if
(
albumArr
.
count
)
{
if
(
albumArr
.
count
)
{
[
albumArr
insertObject
:[
self
modelWithResult
:
group
name
:
name
isCameraRoll
:
NO
needFetchAssets
:
needFetchAssets
]
atIndex
:
1
];
[
albumArr
insertObject
:[
self
modelWithResult
:
group
name
:
name
isCameraRoll
:
NO
needFetchAssets
:
needFetchAssets
]
atIndex
:
1
];
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment