程序运行死活没效果,后来断点发现 -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 没有调用。
解决方法: self.automaticallyAdjustsScrollViewInsets = NO;//解决cellForItemAtIndexPath not called问题
本文介绍了一个UICollectionViewCell未被加载的问题及其解决方案。该问题表现为指定的cellForItemAtIndexPath方法未被调用,导致UI元素无法正常显示。通过设置self.automaticallyAdjustsScrollViewInsets属性为NO,成功解决了cell未加载的问题。
程序运行死活没效果,后来断点发现 -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 没有调用。
解决方法: self.automaticallyAdjustsScrollViewInsets = NO;//解决cellForItemAtIndexPath not called问题
1491

被折叠的 条评论
为什么被折叠?