[英]UICollectionView cell scrolling issue in ios
尝试这个:
[self.collectionView scrollToItemAtIndexPath:yourDesiredIndexPath atScrollPosition:UICollectionViewScrollPositionCenteredVertically animated:NO];
重新加载collectionView之前,请添加以下代码
let indexes = NSIndexPath(forItem: 0, inSection: 0)
self.collectionViewSecond.scrollToItemAtIndexPath(indexes, atScrollPosition: .None, animated: false)
对我来说这是工作,希望对您也一样!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.