iOS 14.2系统下shouldSelectItemAtInd
2021-02-02 本文已影响0人
BoASir
在iOS14.2系统下,UICollectionview会自动触发下面的方法:
-(BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath;
解决方案:
苹果暂未给出方案,苹果官方问题
我们的做法是,将shouldSelectItemAtIndexPath方法收拢到didSelectItemAtIndexPath:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;