0
我有一个水平集合视图和一个按钮。当按钮我拍了拍我打电话CollectionView scrollToItem不滚动
let indexPath : IndexPath = IndexPath(item: item, section: 0)
collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
问题是滚动犯规的那个动画发生,但如果我做一个断点scrollToItem
进入里面的方法。
为什么发生?
没有尝试在主线程跑的? – bisma
检查indexPath是否正确? –
通过'禁用'重试断点 – pkc456