Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很简单的问题。
是否有通知或委托类型的方法来判断何时显示 UICollectionViewCell 对象?
对于 iOS 8 及更高版本,您可以使用UICollectionViewDelegate的willDisplayCell
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
将要:
-[<UICollectionViewDataSource> collectionView:cellForItemAtIndexPath:]
做过:
-[<UICollectionViewDelegate> collectionView:didEndDisplayingCell:forItemAtIndexPath:]