Commit 805b8d8c authored by yuzheng's avatar yuzheng

修复PHAuthorizationStatusLimited权限下的列表页图片不显示和拍照crash问题

parent e7ebc84b
......@@ -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,7 +361,7 @@
_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;
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment