首页 > 技术文章 > UICollectionView完全展示被遮挡的Cell

huaida 2020-09-24 11:15 原文

1,获取要展示item的frame

2,调用展示方法

CGRect itemFrame = [collectionView layoutAttributesForItemAtIndexPath:indexPath].frame;

[collectionView scrollRectToVisible:itemFrame animated:YES];

推荐阅读