0
這是我手勢識別器永遠不會觸發
UICollectionViewController - UICollectionViewCell - UIScrollView中 - ImageView的
我試圖處理水龍頭上的ImageView,但從來沒有被調用。
UITapGestureRecognizer *tap =[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
[cell.imageView addGestureRecognizer:tap];
- (void)handleTap:(UITapGestureRecognizer *)recognizer {
NSLog(@"Tap");
NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:[recognizer locationInView:self.collectionView]];
}