Skip to content
This repository was archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Fix crash issue due to deselect delegate be called by first cell
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Huang committed Aug 22, 2016
1 parent 5097b98 commit bff4c96
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ - (BOOL)collectionView:(UICollectionView *)collectionView shouldDeselectItemAtIn

- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.item == 0) {
// Camera cell doesn't need to be deselected
return;
}
PHFetchResult *fetchResult = self.currentCollectionItem[@"assets"];
PHAsset *asset = fetchResult[indexPath.item-1];

Expand Down

0 comments on commit bff4c96

Please sign in to comment.