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
3972a246
Commit
3972a246
authored
Oct 28, 2020
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化UIAlertController的dismiss
parent
825878c9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
...troller/TZImagePickerController/TZImagePickerController.h
+0
-1
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+0
-5
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+4
-2
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
...roller/TZImagePickerController/TZPhotoPreviewController.m
+4
-5
No files found.
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
View file @
3972a246
...
@@ -196,7 +196,6 @@
...
@@ -196,7 +196,6 @@
#pragma mark -
#pragma mark -
-
(
UIAlertController
*
)
showAlertWithTitle
:(
NSString
*
)
title
;
-
(
UIAlertController
*
)
showAlertWithTitle
:(
NSString
*
)
title
;
-
(
void
)
hideAlertView
:(
UIAlertController
*
)
alertView
;
-
(
void
)
showProgressHUD
;
-
(
void
)
showProgressHUD
;
-
(
void
)
hideProgressHUD
;
-
(
void
)
hideProgressHUD
;
@property
(
nonatomic
,
assign
)
BOOL
isSelectOriginalPhoto
;
@property
(
nonatomic
,
assign
)
BOOL
isSelectOriginalPhoto
;
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
3972a246
...
@@ -419,11 +419,6 @@
...
@@ -419,11 +419,6 @@
return
alertController
;
return
alertController
;
}
}
-
(
void
)
hideAlertView
:(
UIAlertController
*
)
alertView
{
[
alertView
dismissViewControllerAnimated
:
YES
completion
:
nil
];
alertView
=
nil
;
}
-
(
void
)
showProgressHUD
{
-
(
void
)
showProgressHUD
{
if
(
!
_progressHUD
)
{
if
(
!
_progressHUD
)
{
_progressHUD
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
_progressHUD
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
3972a246
...
@@ -472,8 +472,10 @@ static CGFloat itemMargin = 5;
...
@@ -472,8 +472,10 @@ static CGFloat itemMargin = 5;
for
(
id
item
in
photos
)
{
if
([
item
isKindOfClass
:[
NSNumber
class
]])
return
;
}
for
(
id
item
in
photos
)
{
if
([
item
isKindOfClass
:[
NSNumber
class
]])
return
;
}
if
(
havenotShowAlert
)
{
if
(
havenotShowAlert
)
{
[
tzImagePickerVc
hideAlertView
:
alertView
];
[
alertView
dismissViewControllerAnimated
:
YES
completion
:
^
{
alertView
=
nil
;
[
self
didGetAllPhotos
:
photos
assets
:
assets
infoArr
:
infoArr
];
[
self
didGetAllPhotos
:
photos
assets
:
assets
infoArr
:
infoArr
];
}];
}
}
}
progressHandler
:^
(
double
progress
,
NSError
*
_Nonnull
error
,
BOOL
*
_Nonnull
stop
,
NSDictionary
*
_Nonnull
info
)
{
}
progressHandler
:^
(
double
progress
,
NSError
*
_Nonnull
error
,
BOOL
*
_Nonnull
stop
,
NSDictionary
*
_Nonnull
info
)
{
// 如果图片正在从iCloud同步中,提醒用户
// 如果图片正在从iCloud同步中,提醒用户
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
View file @
3972a246
...
@@ -484,21 +484,20 @@
...
@@ -484,21 +484,20 @@
photoPreviewCell
.
cropRect
=
_tzImagePickerVc
.
cropRect
;
photoPreviewCell
.
cropRect
=
_tzImagePickerVc
.
cropRect
;
photoPreviewCell
.
allowCrop
=
_tzImagePickerVc
.
allowCrop
;
photoPreviewCell
.
allowCrop
=
_tzImagePickerVc
.
allowCrop
;
photoPreviewCell
.
scaleAspectFillCrop
=
_tzImagePickerVc
.
scaleAspectFillCrop
;
photoPreviewCell
.
scaleAspectFillCrop
=
_tzImagePickerVc
.
scaleAspectFillCrop
;
__weak
typeof
(
_tzImagePickerVc
)
weakTzImagePickerVc
=
_tzImagePickerVc
;
__weak
typeof
(
_collectionView
)
weakCollectionView
=
_collectionView
;
__weak
typeof
(
_collectionView
)
weakCollectionView
=
_collectionView
;
__weak
typeof
(
photoPreviewCell
)
weakCell
=
photoPreviewCell
;
__weak
typeof
(
photoPreviewCell
)
weakCell
=
photoPreviewCell
;
[
photoPreviewCell
setImageProgressUpdateBlock
:
^
(
double
progress
)
{
[
photoPreviewCell
setImageProgressUpdateBlock
:
^
(
double
progress
)
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
__strong
typeof
(
weakTzImagePickerVc
)
strongTzImagePickerVc
=
weakTzImagePickerVc
;
__strong
typeof
(
weakCollectionView
)
strongCollectionView
=
weakCollectionView
;
__strong
typeof
(
weakCollectionView
)
strongCollectionView
=
weakCollectionView
;
__strong
typeof
(
weakCell
)
strongCell
=
weakCell
;
__strong
typeof
(
weakCell
)
strongCell
=
weakCell
;
strongSelf
.
progress
=
progress
;
strongSelf
.
progress
=
progress
;
if
(
progress
>=
1
)
{
if
(
progress
>=
1
)
{
if
(
strongSelf
.
isSelectOriginalPhoto
)
[
strongSelf
showPhotoBytes
];
if
(
strongSelf
.
isSelectOriginalPhoto
)
[
strongSelf
showPhotoBytes
];
if
(
strongSelf
.
alertView
&&
[
strongCollectionView
.
visibleCells
containsObject
:
strongCell
])
{
if
(
strongSelf
.
alertView
&&
[
strongCollectionView
.
visibleCells
containsObject
:
strongCell
])
{
[
strong
TzImagePickerVc
hideAlertView
:
strongSelf
.
alertView
];
[
strong
Self
.
alertView
dismissViewControllerAnimated
:
YES
completion
:
^
{
strongSelf
.
alertView
=
nil
;
strongSelf
.
alertView
=
nil
;
[
strongSelf
doneButtonClick
];
[
strongSelf
doneButtonClick
];
}];
}
}
}
}
}];
}];
...
...
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