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
efd15353
Commit
efd15353
authored
Nov 05, 2020
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增isFetchingMedia标志位,在获取大图时相册的变化忽略掉
parent
d6f7d36c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
...troller/TZImagePickerController/TZImagePickerController.h
+2
-2
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+1
-1
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+4
-1
No files found.
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
View file @
efd15353
...
...
@@ -67,8 +67,8 @@
/// Default is 600px / 默认600像素宽
@property
(
nonatomic
,
assign
)
CGFloat
photoPreviewMaxWidth
;
/// Default is
15
, While fetching photo, HUD will dismiss automatic if timeout;
/// 超时时间,默认为
15秒,当取图片时间超过15
秒还没有取成功时,会自动dismiss HUD;
/// Default is
30
, While fetching photo, HUD will dismiss automatic if timeout;
/// 超时时间,默认为
30秒,当取图片时间超过30
秒还没有取成功时,会自动dismiss HUD;
@property
(
nonatomic
,
assign
)
NSInteger
timeout
;
/// Default is YES, if set NO, the original photo button will hide. user can't picking original photo.
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
efd15353
...
...
@@ -268,7 +268,7 @@
-
(
void
)
configDefaultSetting
{
self
.
autoSelectCurrentWhenDone
=
YES
;
self
.
timeout
=
15
;
self
.
timeout
=
30
;
self
.
photoWidth
=
828
.
0
;
self
.
photoPreviewMaxWidth
=
600
;
self
.
naviTitleColor
=
[
UIColor
whiteColor
];
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
efd15353
...
...
@@ -45,6 +45,7 @@
@property
(
strong
,
nonatomic
)
CLLocation
*
location
;
@property
(
nonatomic
,
strong
)
NSOperationQueue
*
operationQueue
;
@property
(
nonatomic
,
assign
)
BOOL
isSavingMedia
;
@property
(
nonatomic
,
assign
)
BOOL
isFetchingMedia
;
@end
static
CGSize
AssetGridThumbnailSize
;
...
...
@@ -440,6 +441,7 @@ static CGFloat itemMargin = 5;
[
tzImagePickerVc
showProgressHUD
];
_doneButton
.
enabled
=
NO
;
self
.
isFetchingMedia
=
YES
;
NSMutableArray
*
assets
=
[
NSMutableArray
array
];
NSMutableArray
*
photos
;
NSMutableArray
*
infoArr
;
...
...
@@ -502,6 +504,7 @@ static CGFloat itemMargin = 5;
TZImagePickerController
*
tzImagePickerVc
=
(
TZImagePickerController
*
)
self
.
navigationController
;
[
tzImagePickerVc
hideProgressHUD
];
_doneButton
.
enabled
=
YES
;
self
.
isFetchingMedia
=
NO
;
if
(
tzImagePickerVc
.
autoDismiss
)
{
[
self
.
navigationController
dismissViewControllerAnimated
:
YES
completion
:
^
{
...
...
@@ -963,7 +966,7 @@ static CGFloat itemMargin = 5;
#pragma mark - PHPhotoLibraryChangeObserver
-
(
void
)
photoLibraryDidChange
:(
PHChange
*
)
changeInstance
{
if
(
self
.
isSavingMedia
)
{
if
(
self
.
isSavingMedia
||
self
.
isFetchingMedia
)
{
return
;
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
...
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