我正在使用此代码将我的UICollectionView滚动到顶部:
CGPointMake(0, -self.collectionView.contentInset.top) animated:YES];
它做了它应该做的事情,但问题是在滚动期间细胞消失(或者更好的是,在动画完成之前,不会加载/显示滚动开始位置之上的那些)。有什么方法可以解决这个问题吗?
我还想知道是否有办法告诉这个动画什么时候结束?
谢谢。
答案 0 :(得分:0)
我认为您应该尝试使用此方法滚动到顶部:
- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath
atScrollPosition:(UICollectionViewScrollPosition)scrollPosition
animated:(BOOL)animated