Commit 42860c71 authored by yuzheng's avatar yuzheng

优化一些细节

parent f0f01aa0
...@@ -311,6 +311,10 @@ ...@@ -311,6 +311,10 @@
#pragma mark - Click Event #pragma mark - Click Event
- (void)select:(UIButton *)selectButton { - (void)select:(UIButton *)selectButton {
[self select:selectButton refreshCount:YES];
}
- (void)select:(UIButton *)selectButton refreshCount:(BOOL)refreshCount {
TZImagePickerController *_tzImagePickerVc = (TZImagePickerController *)self.navigationController; TZImagePickerController *_tzImagePickerVc = (TZImagePickerController *)self.navigationController;
TZAssetModel *model = _models[self.currentIndex]; TZAssetModel *model = _models[self.currentIndex];
if (!selectButton.isSelected) { if (!selectButton.isSelected) {
...@@ -367,7 +371,9 @@ ...@@ -367,7 +371,9 @@
} }
} }
model.isSelected = !selectButton.isSelected; model.isSelected = !selectButton.isSelected;
[self refreshNaviBarAndBottomBarState]; if (refreshCount) {
[self refreshNaviBarAndBottomBarState];
}
if (model.isSelected) { if (model.isSelected) {
[UIView showOscillatoryAnimationWithLayer:selectButton.imageView.layer type:TZOscillatoryAnimationToBigger]; [UIView showOscillatoryAnimationWithLayer:selectButton.imageView.layer type:TZOscillatoryAnimationToBigger];
} }
...@@ -405,7 +411,7 @@ ...@@ -405,7 +411,7 @@
if ([[TZImageManager manager] isAssetCannotBeSelected:model.asset]) { if ([[TZImageManager manager] isAssetCannotBeSelected:model.asset]) {
return; return;
} }
[self select:_selectButton]; [self select:_selectButton refreshCount:NO];
} }
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:self.currentIndex inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForItem:self.currentIndex inSection:0];
TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath]; TZPhotoPreviewCell *cell = (TZPhotoPreviewCell *)[_collectionView cellForItemAtIndexPath:indexPath];
......
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