Commit 82742827 authored by yuzheng.tz's avatar yuzheng.tz

消除上个PR带入的警告

parent 24af071a
...@@ -383,24 +383,19 @@ ...@@ -383,24 +383,19 @@
} }
if (_tzImagePickerVc.allowCrop) { // 裁剪状态 if (_tzImagePickerVc.allowCrop) { // 裁剪状态
_doneButton.enabled = NO; _doneButton.enabled = NO;
TZImagePickerController *rootVc = self.navigationController; [_tzImagePickerVc showProgressHUD];
[rootVc showProgressHUD];
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:_currentIndex inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForItem:_currentIndex inSection:0];
TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath]; TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
UIImage *cropedImage = [TZImageCropManager cropImageView:cell.previewView.imageView toRect:_tzImagePickerVc.cropRect zoomScale:cell.previewView.scrollView.zoomScale containerView:self.view]; UIImage *cropedImage = [TZImageCropManager cropImageView:cell.previewView.imageView toRect:_tzImagePickerVc.cropRect zoomScale:cell.previewView.scrollView.zoomScale containerView:self.view];
if (_tzImagePickerVc.needCircleCrop) { if (_tzImagePickerVc.needCircleCrop) {
cropedImage = [TZImageCropManager circularClipImage:cropedImage]; cropedImage = [TZImageCropManager circularClipImage:cropedImage];
} }
dispatch_async(dispatch_get_main_queue(), ^{
_doneButton.enabled = YES; _doneButton.enabled = YES;
[rootVc hideProgressHUD]; [_tzImagePickerVc hideProgressHUD];
if (self.doneButtonClickBlockCropMode) { if (self.doneButtonClickBlockCropMode) {
TZAssetModel *model = _models[_currentIndex]; TZAssetModel *model = _models[_currentIndex];
self.doneButtonClickBlockCropMode(cropedImage,model.asset); self.doneButtonClickBlockCropMode(cropedImage,model.asset);
} }
});
});
} else if (self.doneButtonClickBlock) { // 非裁剪状态 } else if (self.doneButtonClickBlock) { // 非裁剪状态
self.doneButtonClickBlock(_isSelectOriginalPhoto); self.doneButtonClickBlock(_isSelectOriginalPhoto);
} }
......
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