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
38e1472a
Commit
38e1472a
authored
Aug 31, 2016
by
banchichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复两处小问题
parent
23d41f1e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+6
-0
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+0
-1
No files found.
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
38e1472a
...
...
@@ -86,6 +86,8 @@ static CGFloat TZScreenScale;
option
.
sortDescriptors
=
@[[
NSSortDescriptor
sortDescriptorWithKey
:
@"modificationDate"
ascending
:
self
.
sortAscendingByModificationDate
]];
PHFetchResult
*
smartAlbums
=
[
PHAssetCollection
fetchAssetCollectionsWithType
:
PHAssetCollectionTypeSmartAlbum
subtype
:
PHAssetCollectionSubtypeAlbumRegular
options
:
nil
];
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
if
([
self
isCameraRollAlbum
:
collection
.
localizedTitle
])
{
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
model
=
[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
];
...
...
@@ -122,6 +124,8 @@ static CGFloat TZScreenScale;
PHFetchResult
*
topLevelUserCollections
=
[
PHCollectionList
fetchTopLevelUserCollectionsWithOptions
:
nil
];
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
if
(
fetchResult
.
count
<
1
)
continue
;
if
([
collection
.
localizedTitle
containsString
:
@"Deleted"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"最近删除"
])
continue
;
...
...
@@ -132,6 +136,8 @@ static CGFloat TZScreenScale;
}
}
for
(
PHAssetCollection
*
collection
in
topLevelUserCollections
)
{
// 有可能是PHCollectionList类的的对象,过滤掉
if
(
!
[
collection
isKindOfClass
:[
PHAssetCollection
class
]])
return
;
PHFetchResult
*
fetchResult
=
[
PHAsset
fetchAssetsInAssetCollection
:
collection
options
:
option
];
if
(
fetchResult
.
count
<
1
)
continue
;
[
albumArr
addObject
:[
self
modelWithResult
:
fetchResult
name
:
collection
.
localizedTitle
]];
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
38e1472a
...
...
@@ -148,7 +148,6 @@
self
.
allowPickingOriginalPhoto
=
self
.
allowPickingOriginalPhoto
;
self
.
timeout
=
15
;
self
.
photoWidth
=
828
.
0
;
self
.
maxImagesCount
=
selectedAssets
.
count
;
self
.
photoPreviewMaxWidth
=
600
;
self
.
barItemTextFont
=
[
UIFont
systemFontOfSize
:
15
];
self
.
barItemTextColor
=
[
UIColor
whiteColor
];
...
...
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