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
f2f2364d
Commit
f2f2364d
authored
Jun 21, 2016
by
banchichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增sortAscendingByModificationDate属性,默认为YES,照片按修改时间升序排列,为NO则拍照按钮会在第一个,照片降序排列
parent
d018bef1
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
34 deletions
+97
-34
.DS_Store
.DS_Store
+0
-0
TZImagePickerController/TZImagePickerController/TZAssetCell.m
...agePickerController/TZImagePickerController/TZAssetCell.m
+2
-2
TZImagePickerController/TZImagePickerController/TZImageManager.h
...PickerController/TZImagePickerController/TZImageManager.h
+4
-0
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+25
-9
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
...troller/TZImagePickerController/TZImagePickerController.h
+4
-0
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+7
-0
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.h
...troller/TZImagePickerController/TZPhotoPickerController.h
+2
-0
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+49
-23
TZImagePickerController/ViewController.m
TZImagePickerController/ViewController.m
+4
-0
No files found.
.DS_Store
View file @
f2f2364d
No preview for this file type
TZImagePickerController/TZImagePickerController/TZAssetCell.m
View file @
f2f2364d
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
if
([
self
.
representedAssetIdentifier
isEqualToString
:[[
TZImageManager
manager
]
getAssetIdentifier
:
model
.
asset
]])
{
if
([
self
.
representedAssetIdentifier
isEqualToString
:[[
TZImageManager
manager
]
getAssetIdentifier
:
model
.
asset
]])
{
self
.
imageView
.
image
=
photo
;
self
.
imageView
.
image
=
photo
;
}
else
{
}
else
{
NSLog
(
@"this cell is showing other asset"
);
//
NSLog(@"this cell is showing other asset");
[[
PHImageManager
defaultManager
]
cancelImageRequest
:
self
.
imageRequestID
];
[[
PHImageManager
defaultManager
]
cancelImageRequest
:
self
.
imageRequestID
];
}
}
if
(
!
isDegraded
)
{
if
(
!
isDegraded
)
{
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
}];
}];
if
(
imageRequestID
&&
self
.
imageRequestID
&&
imageRequestID
!=
self
.
imageRequestID
)
{
if
(
imageRequestID
&&
self
.
imageRequestID
&&
imageRequestID
!=
self
.
imageRequestID
)
{
[[
PHImageManager
defaultManager
]
cancelImageRequest
:
self
.
imageRequestID
];
[[
PHImageManager
defaultManager
]
cancelImageRequest
:
self
.
imageRequestID
];
NSLog
(
@"cancelImageRequest %d"
,
self
.
imageRequestID
);
//
NSLog(@"cancelImageRequest %d",self.imageRequestID);
}
}
self
.
imageRequestID
=
imageRequestID
;
self
.
imageRequestID
=
imageRequestID
;
self
.
selectPhotoButton
.
selected
=
model
.
isSelected
;
self
.
selectPhotoButton
.
selected
=
model
.
isSelected
;
...
...
TZImagePickerController/TZImagePickerController/TZImageManager.h
View file @
f2f2364d
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
/// Default is 600px / 默认600像素宽
/// Default is 600px / 默认600像素宽
@property
(
nonatomic
,
assign
)
CGFloat
photoPreviewMaxWidth
;
@property
(
nonatomic
,
assign
)
CGFloat
photoPreviewMaxWidth
;
/// Sort photos ascending by modificationDate,Default is YES
/// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
@property
(
nonatomic
,
assign
)
BOOL
sortAscendingByModificationDate
;
/// Return YES if Authorized 返回YES如果得到了授权
/// Return YES if Authorized 返回YES如果得到了授权
-
(
BOOL
)
authorizationStatusAuthorized
;
-
(
BOOL
)
authorizationStatusAuthorized
;
...
...
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
f2f2364d
...
@@ -67,12 +67,12 @@ static CGFloat TZScreenScale;
...
@@ -67,12 +67,12 @@ static CGFloat TZScreenScale;
if
(
!
allowPickingVideo
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
PHAssetMediaTypeImage
];
if
(
!
allowPickingVideo
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
PHAssetMediaTypeImage
];
if
(
!
allowPickingImage
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
if
(
!
allowPickingImage
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
PHAssetMediaTypeVideo
];
PHAssetMediaTypeVideo
];
// option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:
YES
]];
// option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:
self.sortAscendingByModificationDate
]];
option
.
sortDescriptors
=
@[[
NSSortDescriptor
sortDescriptorWithKey
:
@"modificationDate"
ascending
:
YES
]];
option
.
sortDescriptors
=
@[[
NSSortDescriptor
sortDescriptorWithKey
:
@"modificationDate"
ascending
:
self
.
sortAscendingByModificationDate
]];
PHFetchResult
*
smartAlbums
=
[
PHAssetCollection
fetchAssetCollectionsWithType
:
PHAssetCollectionTypeSmartAlbum
subtype
:
PHAssetCollectionSubtypeSmartAlbumUserLibrary
options
:
nil
];
PHFetchResult
*
smartAlbums
=
[
PHAssetCollection
fetchAssetCollectionsWithType
:
PHAssetCollectionTypeSmartAlbum
subtype
:
PHAssetCollectionSubtypeSmartAlbumUserLibrary
options
:
nil
];
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
for
(
PHAssetCollection
*
collection
in
smartAlbums
)
{
if
([
collection
.
localizedTitle
isEqualToString
:
@"Camera Roll"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"相机胶卷"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"所有照片"
])
{
if
([
collection
.
localizedTitle
isEqualToString
:
@"Camera Roll"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"相机胶卷"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"所有照片"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"All Photos"
]
)
{
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
];
if
(
completion
)
completion
(
model
);
if
(
completion
)
completion
(
model
);
...
@@ -83,7 +83,7 @@ static CGFloat TZScreenScale;
...
@@ -83,7 +83,7 @@ static CGFloat TZScreenScale;
[
self
.
assetLibrary
enumerateGroupsWithTypes
:
ALAssetsGroupAll
usingBlock
:
^
(
ALAssetsGroup
*
group
,
BOOL
*
stop
)
{
[
self
.
assetLibrary
enumerateGroupsWithTypes
:
ALAssetsGroupAll
usingBlock
:
^
(
ALAssetsGroup
*
group
,
BOOL
*
stop
)
{
if
([
group
numberOfAssets
]
<
1
)
return
;
if
([
group
numberOfAssets
]
<
1
)
return
;
NSString
*
name
=
[
group
valueForProperty
:
ALAssetsGroupPropertyName
];
NSString
*
name
=
[
group
valueForProperty
:
ALAssetsGroupPropertyName
];
if
([
name
isEqualToString
:
@"Camera Roll"
]
||
[
name
isEqualToString
:
@"相机胶卷"
]
||
[
name
isEqualToString
:
@"所有照片"
])
{
if
([
name
isEqualToString
:
@"Camera Roll"
]
||
[
name
isEqualToString
:
@"相机胶卷"
]
||
[
name
isEqualToString
:
@"所有照片"
]
||
[
name
isEqualToString
:
@"All Photos"
]
)
{
model
=
[
self
modelWithResult
:
group
name
:
name
];
model
=
[
self
modelWithResult
:
group
name
:
name
];
if
(
completion
)
completion
(
model
);
if
(
completion
)
completion
(
model
);
*
stop
=
YES
;
*
stop
=
YES
;
...
@@ -100,8 +100,8 @@ static CGFloat TZScreenScale;
...
@@ -100,8 +100,8 @@ static CGFloat TZScreenScale;
if
(
!
allowPickingImage
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
if
(
!
allowPickingImage
)
option
.
predicate
=
[
NSPredicate
predicateWithFormat
:
@"mediaType == %ld"
,
PHAssetMediaTypeVideo
];
PHAssetMediaTypeVideo
];
// option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:
YES
]];
// option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:
self.sortAscendingByModificationDate
]];
option
.
sortDescriptors
=
@[[
NSSortDescriptor
sortDescriptorWithKey
:
@"modificationDate"
ascending
:
YES
]];
option
.
sortDescriptors
=
@[[
NSSortDescriptor
sortDescriptorWithKey
:
@"modificationDate"
ascending
:
self
.
sortAscendingByModificationDate
]];
PHAssetCollectionSubtype
smartAlbumSubtype
=
PHAssetCollectionSubtypeSmartAlbumUserLibrary
|
PHAssetCollectionSubtypeSmartAlbumRecentlyAdded
|
PHAssetCollectionSubtypeSmartAlbumVideos
;
PHAssetCollectionSubtype
smartAlbumSubtype
=
PHAssetCollectionSubtypeSmartAlbumUserLibrary
|
PHAssetCollectionSubtypeSmartAlbumRecentlyAdded
|
PHAssetCollectionSubtypeSmartAlbumVideos
;
// For iOS 9, We need to show ScreenShots Album && SelfPortraits Album
// For iOS 9, We need to show ScreenShots Album && SelfPortraits Album
...
@@ -183,7 +183,7 @@ static CGFloat TZScreenScale;
...
@@ -183,7 +183,7 @@ static CGFloat TZScreenScale;
}
else
if
(
allowPickingImage
)
{
}
else
if
(
allowPickingImage
)
{
[
group
setAssetsFilter
:[
ALAssetsFilter
allPhotos
]];
[
group
setAssetsFilter
:[
ALAssetsFilter
allPhotos
]];
}
}
[
group
enumerateAssetsUsingBlock
:
^
(
ALAsset
*
result
,
NSUInteger
index
,
BOOL
*
stop
)
{
ALAssetsGroupEnumerationResultsBlock
resultBlock
=
^
(
ALAsset
*
result
,
NSUInteger
index
,
BOOL
*
stop
)
{
if
(
result
==
nil
)
{
if
(
result
==
nil
)
{
if
(
completion
)
completion
(
photoArr
);
if
(
completion
)
completion
(
photoArr
);
}
}
...
@@ -202,7 +202,16 @@ static CGFloat TZScreenScale;
...
@@ -202,7 +202,16 @@ static CGFloat TZScreenScale;
}
else
{
}
else
{
[
photoArr
addObject
:[
TZAssetModel
modelWithAsset
:
result
type
:
type
]];
[
photoArr
addObject
:[
TZAssetModel
modelWithAsset
:
result
type
:
type
]];
}
}
}];
};
if
(
self
.
sortAscendingByModificationDate
)
{
[
group
enumerateAssetsUsingBlock
:
^
(
ALAsset
*
result
,
NSUInteger
index
,
BOOL
*
stop
)
{
if
(
resultBlock
)
{
resultBlock
(
result
,
index
,
stop
);
}
}];
}
else
{
[
group
enumerateAssetsWithOptions
:
NSEnumerationReverse
usingBlock
:
^
(
ALAsset
*
result
,
NSUInteger
index
,
BOOL
*
stop
)
{
if
(
resultBlock
)
{
resultBlock
(
result
,
index
,
stop
);
}
}];
}
}
}
}
}
...
@@ -387,9 +396,14 @@ static CGFloat TZScreenScale;
...
@@ -387,9 +396,14 @@ static CGFloat TZScreenScale;
return
0
;
return
0
;
}
}
/// Get postImage / 获取封面图
-
(
void
)
getPostImageWithAlbumModel
:(
TZAlbumModel
*
)
model
completion
:(
void
(
^
)(
UIImage
*
))
completion
{
-
(
void
)
getPostImageWithAlbumModel
:(
TZAlbumModel
*
)
model
completion
:(
void
(
^
)(
UIImage
*
))
completion
{
if
(
iOS8Later
)
{
if
(
iOS8Later
)
{
[[
TZImageManager
manager
]
getPhotoWithAsset
:[
model
.
result
lastObject
]
photoWidth
:
80
completion
:^
(
UIImage
*
photo
,
NSDictionary
*
info
,
BOOL
isDegraded
)
{
id
asset
=
[
model
.
result
lastObject
];
if
(
!
self
.
sortAscendingByModificationDate
)
{
asset
=
[
model
.
result
firstObject
];
}
[[
TZImageManager
manager
]
getPhotoWithAsset
:
asset
photoWidth
:
80
completion
:^
(
UIImage
*
photo
,
NSDictionary
*
info
,
BOOL
isDegraded
)
{
if
(
completion
)
completion
(
photo
);
if
(
completion
)
completion
(
photo
);
}];
}];
}
else
{
}
else
{
...
@@ -459,6 +473,7 @@ static CGFloat TZScreenScale;
...
@@ -459,6 +473,7 @@ static CGFloat TZScreenScale;
#pragma mark - Get Video
#pragma mark - Get Video
/// Get Video / 获取视频
-
(
void
)
getVideoWithAsset
:(
id
)
asset
completion
:(
void
(
^
)(
AVPlayerItem
*
_Nullable
,
NSDictionary
*
_Nullable
))
completion
{
-
(
void
)
getVideoWithAsset
:(
id
)
asset
completion
:(
void
(
^
)(
AVPlayerItem
*
_Nullable
,
NSDictionary
*
_Nullable
))
completion
{
if
([
asset
isKindOfClass
:[
PHAsset
class
]])
{
if
([
asset
isKindOfClass
:[
PHAsset
class
]])
{
[[
PHImageManager
defaultManager
]
requestPlayerItemForVideo
:
asset
options
:
nil
resultHandler
:^
(
AVPlayerItem
*
_Nullable
playerItem
,
NSDictionary
*
_Nullable
info
)
{
[[
PHImageManager
defaultManager
]
requestPlayerItemForVideo
:
asset
options
:
nil
resultHandler
:^
(
AVPlayerItem
*
_Nullable
playerItem
,
NSDictionary
*
_Nullable
info
)
{
...
@@ -476,6 +491,7 @@ static CGFloat TZScreenScale;
...
@@ -476,6 +491,7 @@ static CGFloat TZScreenScale;
#pragma mark - Export video
#pragma mark - Export video
/// Export Video / 导出视频,暂仅仅支持iOS8.0+
-
(
void
)
getVideoOutputPathWithAsset
:(
id
)
asset
completion
:(
void
(
^
)(
NSString
*
outputPath
))
completion
{
-
(
void
)
getVideoOutputPathWithAsset
:(
id
)
asset
completion
:(
void
(
^
)(
NSString
*
outputPath
))
completion
{
if
([
asset
isKindOfClass
:[
PHAsset
class
]])
{
if
([
asset
isKindOfClass
:[
PHAsset
class
]])
{
PHVideoRequestOptions
*
options
=
[[
PHVideoRequestOptions
alloc
]
init
];
PHVideoRequestOptions
*
options
=
[[
PHVideoRequestOptions
alloc
]
init
];
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
View file @
f2f2364d
...
@@ -34,6 +34,10 @@
...
@@ -34,6 +34,10 @@
/// Default is 9 / 默认最大可选9张图片
/// Default is 9 / 默认最大可选9张图片
@property
(
nonatomic
,
assign
)
NSInteger
maxImagesCount
;
@property
(
nonatomic
,
assign
)
NSInteger
maxImagesCount
;
/// Sort photos ascending by modificationDate,Default is YES
/// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
@property
(
nonatomic
,
assign
)
BOOL
sortAscendingByModificationDate
;
/// Default is 828px / 默认828像素宽
/// Default is 828px / 默认828像素宽
@property
(
nonatomic
,
assign
)
CGFloat
photoWidth
;
@property
(
nonatomic
,
assign
)
CGFloat
photoWidth
;
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
f2f2364d
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
self
.
timeout
=
15
;
self
.
timeout
=
15
;
self
.
photoWidth
=
828
.
0
;
self
.
photoWidth
=
828
.
0
;
self
.
photoPreviewMaxWidth
=
600
;
self
.
photoPreviewMaxWidth
=
600
;
self
.
sortAscendingByModificationDate
=
YES
;
if
(
!
[[
TZImageManager
manager
]
authorizationStatusAuthorized
])
{
if
(
!
[[
TZImageManager
manager
]
authorizationStatusAuthorized
])
{
_tipLable
=
[[
UILabel
alloc
]
init
];
_tipLable
=
[[
UILabel
alloc
]
init
];
...
@@ -148,6 +149,7 @@
...
@@ -148,6 +149,7 @@
_pushToPhotoPickerVc
=
YES
;
_pushToPhotoPickerVc
=
YES
;
if
(
_pushToPhotoPickerVc
)
{
if
(
_pushToPhotoPickerVc
)
{
TZPhotoPickerController
*
photoPickerVc
=
[[
TZPhotoPickerController
alloc
]
init
];
TZPhotoPickerController
*
photoPickerVc
=
[[
TZPhotoPickerController
alloc
]
init
];
photoPickerVc
.
isFirstAppear
=
YES
;
[[
TZImageManager
manager
]
getCameraRollAlbum
:
self
.
allowPickingVideo
allowPickingImage
:
self
.
allowPickingImage
completion
:^
(
TZAlbumModel
*
model
)
{
[[
TZImageManager
manager
]
getCameraRollAlbum
:
self
.
allowPickingVideo
allowPickingImage
:
self
.
allowPickingImage
completion
:^
(
TZAlbumModel
*
model
)
{
photoPickerVc
.
model
=
model
;
photoPickerVc
.
model
=
model
;
[
self
pushViewController
:
photoPickerVc
animated
:
YES
];
[
self
pushViewController
:
photoPickerVc
animated
:
YES
];
...
@@ -251,6 +253,11 @@
...
@@ -251,6 +253,11 @@
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
}
}
-
(
void
)
setSortAscendingByModificationDate
:(
BOOL
)
sortAscendingByModificationDate
{
_sortAscendingByModificationDate
=
sortAscendingByModificationDate
;
[
TZImageManager
manager
].
sortAscendingByModificationDate
=
sortAscendingByModificationDate
;
}
-
(
void
)
pushViewController
:(
UIViewController
*
)
viewController
animated
:(
BOOL
)
animated
{
-
(
void
)
pushViewController
:(
UIViewController
*
)
viewController
animated
:(
BOOL
)
animated
{
if
(
iOS7Later
)
viewController
.
automaticallyAdjustsScrollViewInsets
=
NO
;
if
(
iOS7Later
)
viewController
.
automaticallyAdjustsScrollViewInsets
=
NO
;
if
(
_timer
)
{
[
_timer
invalidate
];
_timer
=
nil
;}
if
(
_timer
)
{
[
_timer
invalidate
];
_timer
=
nil
;}
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.h
View file @
f2f2364d
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
@class
TZAlbumModel
;
@class
TZAlbumModel
;
@interface
TZPhotoPickerController
:
UIViewController
@interface
TZPhotoPickerController
:
UIViewController
@property
(
nonatomic
,
assign
)
BOOL
isFirstAppear
;
@property
(
nonatomic
,
strong
)
TZAlbumModel
*
model
;
@property
(
nonatomic
,
strong
)
TZAlbumModel
*
model
;
@property
(
nonatomic
,
copy
)
void
(
^
backButtonClickHandle
)(
TZAlbumModel
*
model
);
@property
(
nonatomic
,
copy
)
void
(
^
backButtonClickHandle
)(
TZAlbumModel
*
model
);
@end
@end
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
f2f2364d
This diff is collapsed.
Click to expand it.
TZImagePickerController/ViewController.m
View file @
f2f2364d
...
@@ -122,6 +122,8 @@
...
@@ -122,6 +122,8 @@
-
(
IBAction
)
pickPhotoButtonClick
:(
UIButton
*
)
sender
{
-
(
IBAction
)
pickPhotoButtonClick
:(
UIButton
*
)
sender
{
TZImagePickerController
*
imagePickerVc
=
[[
TZImagePickerController
alloc
]
initWithMaxImagesCount
:
9
delegate
:
self
];
TZImagePickerController
*
imagePickerVc
=
[[
TZImagePickerController
alloc
]
initWithMaxImagesCount
:
9
delegate
:
self
];
imagePickerVc
.
isSelectOriginalPhoto
=
_isSelectOriginalPhoto
;
imagePickerVc
.
isSelectOriginalPhoto
=
_isSelectOriginalPhoto
;
// tip:如果你需要将拍照放在外面,不要传这个参数
imagePickerVc
.
selectedAssets
=
_selectedAssets
;
// optional, 可选的
imagePickerVc
.
selectedAssets
=
_selectedAssets
;
// optional, 可选的
// imagePickerVc.allowTakePicture = NO; // 隐藏拍照按钮
// imagePickerVc.allowTakePicture = NO; // 隐藏拍照按钮
...
@@ -143,6 +145,8 @@
...
@@ -143,6 +145,8 @@
// imagePickerVc.allowPickingImage = NO;
// imagePickerVc.allowPickingImage = NO;
// imagePickerVc.allowPickingOriginalPhoto = NO;
// imagePickerVc.allowPickingOriginalPhoto = NO;
imagePickerVc
.
sortAscendingByModificationDate
=
NO
;
[
self
presentViewController
:
imagePickerVc
animated
:
YES
completion
:
nil
];
[
self
presentViewController
:
imagePickerVc
animated
:
YES
completion
:
nil
];
}
}
...
...
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