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
3c6c6cb5
Commit
3c6c6cb5
authored
Sep 22, 2016
by
zhouzhiqiang1
Committed by
GitHub
Sep 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHCollectionList类的的对象,过滤掉
有可能是PHCollectionList类的的对象,过滤掉(ps过滤不应该 return的吧)
parent
d0efb6a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+3
-3
No files found.
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
3c6c6cb5
...
@@ -87,7 +87,7 @@ static CGFloat TZScreenScale;
...
@@ -87,7 +87,7 @@ static CGFloat TZScreenScale;
PHFetchResult
*
smartAlbums
=
[
PHAssetCollection
fetchAssetCollectionsWithType
:
PHAssetCollectionTypeSmartAlbum
subtype
:
PHAssetCollectionSubtypeAlbumRegular
options
:
nil
];
PHFetchResult
*
smartAlbums
=
[
PHAssetCollection
fetchAssetCollectionsWithType
:
PHAssetCollectionTypeSmartAlbum
subtype
:
PHAssetCollectionSubtypeAlbumRegular
options
:
nil
];
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
continue
;
if
([
self
isCameraRollAlbum
:
collection
.
localizedTitle
])
{
if
([
self
isCameraRollAlbum
:
collection
.
localizedTitle
])
{
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
model
=
[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
];
model
=
[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
];
...
@@ -125,7 +125,7 @@ static CGFloat TZScreenScale;
...
@@ -125,7 +125,7 @@ static CGFloat TZScreenScale;
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
continue
;
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
if
(
fetchResult
.
count
<
1
)
continue
;
if
(
fetchResult
.
count
<
1
)
continue
;
if
([
collection
.
localizedTitle
containsString
:
@"Deleted"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"最近删除"
])
continue
;
if
([
collection
.
localizedTitle
containsString
:
@"Deleted"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"最近删除"
])
continue
;
...
@@ -137,7 +137,7 @@ static CGFloat TZScreenScale;
...
@@ -137,7 +137,7 @@ static CGFloat TZScreenScale;
}
}
for
(
PHAssetCollection
*
collection
in
topLevelUserCollections
)
{
for
(
PHAssetCollection
*
collection
in
topLevelUserCollections
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
continue
;
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
if
(
fetchResult
.
count
<
1
)
continue
;
if
(
fetchResult
.
count
<
1
)
continue
;
[
albumArr
addObject
:[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
]];
[
albumArr
addObject
:[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
]];
...
...
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