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
805b8d8c
Commit
805b8d8c
authored
Jul 16, 2020
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复PHAuthorizationStatusLimited权限下的列表页图片不显示和拍照crash问题
parent
e7ebc84b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
TZImagePickerController/TZImagePickerController/TZAssetCell.m
...agePickerController/TZImagePickerController/TZAssetCell.m
+4
-2
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+4
-1
No files found.
TZImagePickerController/TZImagePickerController/TZAssetCell.m
View file @
805b8d8c
...
...
@@ -41,6 +41,7 @@
// Set the cell's thumbnail image if it's still showing the same asset.
if
([
self
.
representedAssetIdentifier
isEqualToString
:
model
.
asset
.
localIdentifier
])
{
self
.
imageView
.
image
=
photo
;
[
self
setNeedsLayout
];
}
else
{
// NSLog(@"this cell is showing other asset");
[[
PHImageManager
defaultManager
]
cancelImageRequest
:
self
.
imageRequestID
];
...
...
@@ -360,8 +361,8 @@
_selectImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
}
_indexLabel
.
frame
=
_selectImageView
.
frame
;
_imageView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
tz_width
,
self
.
tz_height
)
;
_imageView
.
frame
=
self
.
bounds
;
static
CGFloat
progressWH
=
20
;
CGFloat
progressXY
=
(
self
.
tz_width
-
progressWH
)
/
2
;
_progressView
.
frame
=
CGRectMake
(
progressXY
,
progressXY
,
progressWH
,
progressWH
);
...
...
@@ -413,6 +414,7 @@
self
.
titleLabel
.
attributedText
=
nameString
;
[[
TZImageManager
manager
]
getPostImageWithAlbumModel
:
model
completion
:
^
(
UIImage
*
postImage
)
{
self
.
posterImageView
.
image
=
postImage
;
[
self
setNeedsLayout
];
}];
if
(
model
.
selectedCount
)
{
self
.
selectedCountButton
.
hidden
=
NO
;
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
805b8d8c
...
...
@@ -826,8 +826,11 @@ static CGFloat itemMargin = 5;
NSDictionary
*
meta
=
[
info
objectForKey
:
UIImagePickerControllerMediaMetadata
];
if
(
photo
)
{
[[
TZImageManager
manager
]
savePhotoWithImage
:
photo
meta
:
meta
location
:
self
.
location
completion
:^
(
PHAsset
*
asset
,
NSError
*
error
){
if
(
!
error
)
{
if
(
!
error
&&
asset
)
{
[
self
addPHAsset
:
asset
];
}
else
{
TZImagePickerController
*
tzImagePickerVc
=
(
TZImagePickerController
*
)
self
.
navigationController
;
[
tzImagePickerVc
hideProgressHUD
];
}
}];
self
.
location
=
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