This repository was archived by the owner on Jul 15, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
YangMingShan/YMSPhotoPicker/Public Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ - (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtInde
234234- (void )collectionView : (UICollectionView *)collectionView didSelectItemAtIndexPath : (NSIndexPath *)indexPath
235235{
236236 if (indexPath.row == 0 ) {
237+ [self .photoCollectionView deselectItemAtIndexPath: indexPath animated: NO ];
237238 [self yms_presentCameraCaptureViewWithDelegate: self ];
238239 }
239240 else if (NO == self.allowsMultipleSelection ) {
@@ -457,8 +458,6 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking
457458- (void )imagePickerControllerDidCancel : (UIImagePickerController *)picker
458459{
459460 [picker dismissViewControllerAnimated: YES completion: ^(){
460- [self .photoCollectionView deselectItemAtIndexPath: [NSIndexPath indexPathForItem: 0 inSection: 0 ] animated: NO ];
461-
462461 // Enable camera preview when user allow it first time
463462 if (![self .session isRunning ]) {
464463 [self .photoCollectionView reloadItemsAtIndexPaths: @[[NSIndexPath indexPathForItem: 0 inSection: 0 ]]];
You can’t perform that action at this time.
0 commit comments