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
d5ae7b77
Unverified
Commit
d5ae7b77
authored
Dec 25, 2020
by
谭真
Committed by
GitHub
Dec 25, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1449 from macMaJi/master
fix 内存泄漏
parents
ba97a4a2
6b07cc52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
TZImagePickerController/TZImagePickerController/TZImageManager.m
...PickerController/TZImagePickerController/TZImageManager.m
+8
-8
No files found.
TZImagePickerController/TZImagePickerController/TZImageManager.m
View file @
d5ae7b77
...
@@ -467,10 +467,10 @@ static dispatch_once_t onceToken;
...
@@ -467,10 +467,10 @@ static dispatch_once_t onceToken;
[
option
setProgressHandler
:
progressHandler
];
[
option
setProgressHandler
:
progressHandler
];
}
}
option
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
option
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
return
[[
PHImageManager
defaultManager
]
requestImage
ForAsset
:
asset
targetSize
:
PHImageManagerMaximumSize
contentMode
:
PHImageContentModeAspectFit
options
:
option
resultHandler
:^
(
UIImage
*
result
,
NSDictionary
*
info
)
{
return
[[
PHImageManager
defaultManager
]
requestImage
DataForAsset
:
asset
options
:
option
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
BOOL
cancelled
=
[[
info
objectForKey
:
PHImageCancelledKey
]
boolValue
];
BOOL
cancelled
=
[[
info
objectForKey
:
PHImageCancelledKey
]
boolValue
];
if
(
!
cancelled
&&
result
)
{
if
(
!
cancelled
&&
imageData
)
{
result
=
[
self
fixOrientation
:
result
];
UIImage
*
result
=
[
self
fixOrientation
:[
UIImage
imageWithData
:
imageData
]
];
BOOL
isDegraded
=
[[
info
objectForKey
:
PHImageResultIsDegradedKey
]
boolValue
];
BOOL
isDegraded
=
[[
info
objectForKey
:
PHImageResultIsDegradedKey
]
boolValue
];
if
(
completion
)
completion
(
result
,
info
,
isDegraded
);
if
(
completion
)
completion
(
result
,
info
,
isDegraded
);
}
}
...
...
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