简体   繁体   中英

didSelectItemAtIndexPath doesn't work normally

I have a problem when tap an item into CollectionView.

didSelectItemAtIndexPath doesn't called when tapped the item. Only execute this method when hold the item.

This is the method implementation.

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath    *)indexPath {

  NSLog(@"did select at index path %@", indexPath);
  _magazine = [[AppController instance] magazines][indexPath.row];
  [self loadEditionsForMagazine:_magazine];
  _magazineEditionsView.hidden = NO;
}

My CollectionView is linked to the datasource and delegate.

Thanks.

Check these:

  1. Nothing is upon your UICollectionView .
  2. No subviews of UICollectionView receiving gesture before UICollectionView .
  3. Or there is no other gesture recognition active.

Hope this helps.. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM