Commit d385581d authored by 董江鹏's avatar 董江鹏

fix:选择单张照片时,如果照片的数据为 nil,回传空数组。业务层使用时判断 photos 和 assets 数组是否为空

parent eaaf6603
...@@ -825,7 +825,15 @@ static CGFloat itemMargin = 5; ...@@ -825,7 +825,15 @@ static CGFloat itemMargin = 5;
}]; }];
[photoPreviewVc setDoneButtonClickBlockCropMode:^(UIImage *cropedImage, id asset) { [photoPreviewVc setDoneButtonClickBlockCropMode:^(UIImage *cropedImage, id asset) {
__strong typeof(weakSelf) strongSelf = weakSelf; __strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf didGetAllPhotos:@[cropedImage] assets:@[asset] infoArr:nil]; NSArray *assets = @[];
if (asset) {
assets = @[asset];
}
NSArray *photos = @[];
if (cropedImage) {
photos = @[cropedImage];
}
[strongSelf didGetAllPhotos:photos assets:assets infoArr:nil];
}]; }];
[self.navigationController pushViewController:photoPreviewVc animated:YES]; [self.navigationController pushViewController:photoPreviewVc animated:YES];
} }
......
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