When using collectionView.scrollToItem
with IndexPath
. is it possible to set custom scroll speed?
Yes, it is possible. Try this:
UIView.animate(withDuration: 5, animations: { [weak self] in
self?.collectionView.scrollToItem(at: IndexPath(item: 10, section: 10), at: .middle, animated: false)
})