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
0ab502fb
Commit
0ab502fb
authored
May 31, 2021
by
肖兰月
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/banchichen/TZImagePickerController
parents
8a345102
4c6020a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+16
-14
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+2
-2
No files found.
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
0ab502fb
...
...
@@ -339,11 +339,7 @@ static dispatch_once_t onceToken;
/// Get photo 获得照片本身
-
(
PHImageRequestID
)
getPhotoWithAsset
:(
PHAsset
*
)
asset
completion
:(
void
(
^
)(
UIImage
*
,
NSDictionary
*
,
BOOL
isDegraded
))
completion
{
CGFloat
fullScreenWidth
=
TZScreenWidth
;
if
(
fullScreenWidth
>
_photoPreviewMaxWidth
)
{
fullScreenWidth
=
_photoPreviewMaxWidth
;
}
return
[
self
getPhotoWithAsset
:
asset
photoWidth
:
fullScreenWidth
completion
:
completion
progressHandler
:
nil
networkAccessAllowed
:
YES
];
return
[
self
getPhotoWithAsset
:
asset
completion
:
completion
progressHandler
:
nil
networkAccessAllowed
:
YES
];
}
-
(
PHImageRequestID
)
getPhotoWithAsset
:(
PHAsset
*
)
asset
photoWidth
:(
CGFloat
)
photoWidth
completion
:(
void
(
^
)(
UIImage
*
photo
,
NSDictionary
*
info
,
BOOL
isDegraded
))
completion
{
...
...
@@ -531,10 +527,12 @@ static dispatch_once_t onceToken;
request
.
creationDate
=
[
NSDate
date
];
}
completionHandler
:
^
(
BOOL
success
,
NSError
*
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
success
&&
completion
)
{
if
(
success
&&
completion
&&
localIdentifier
)
{
[
self
fetchAssetByIocalIdentifier
:
localIdentifier
retryCount
:
10
completion
:
completion
];
}
else
if
(
error
)
{
}
else
{
if
(
error
)
{
NSLog
(
@"保存照片出错:%@"
,
error
.
localizedDescription
);
}
if
(
completion
)
{
completion
(
nil
,
error
);
}
...
...
@@ -567,10 +565,12 @@ static dispatch_once_t onceToken;
}
completionHandler
:
^
(
BOOL
success
,
NSError
*
error
)
{
[[
NSFileManager
defaultManager
]
removeItemAtPath
:
path
error
:
nil
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
success
&&
completion
)
{
if
(
success
&&
completion
&&
localIdentifier
)
{
[
self
fetchAssetByIocalIdentifier
:
localIdentifier
retryCount
:
10
completion
:
completion
];
}
else
if
(
error
)
{
}
else
{
if
(
error
)
{
NSLog
(
@"保存照片出错:%@"
,
error
.
localizedDescription
);
}
if
(
completion
)
{
completion
(
nil
,
error
);
}
...
...
@@ -609,10 +609,12 @@ static dispatch_once_t onceToken;
request
.
creationDate
=
[
NSDate
date
];
}
completionHandler
:
^
(
BOOL
success
,
NSError
*
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
success
&&
completion
)
{
if
(
success
&&
completion
&&
localIdentifier
)
{
[
self
fetchAssetByIocalIdentifier
:
localIdentifier
retryCount
:
10
completion
:
completion
];
}
else
if
(
error
)
{
}
else
{
if
(
error
)
{
NSLog
(
@"保存视频出错:%@"
,
error
.
localizedDescription
);
}
if
(
completion
)
{
completion
(
nil
,
error
);
}
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
0ab502fb
...
...
@@ -528,8 +528,8 @@
_timeout
=
timeout
;
if
(
timeout
<
5
)
{
_timeout
=
5
;
}
else
if
(
_timeout
>
60
)
{
_timeout
=
60
;
}
else
if
(
_timeout
>
60
0
)
{
_timeout
=
60
0
;
}
}
...
...
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