Issue #311
See Omnia https://github.com/onmyway133/Omnia/blob/master/Sources/iOS/UICollectionView.swift#L30
extension HorizontalUsersViewController: UIScrollViewDelegate {
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
let point = view.convert(collectionView.center, to: collectionView)
guard
let indexPath = collectionView.indexPathForItem(at: point),
indexPath.item < users.count
else {
return
}
let user = users[indexPath.item]
delegate?.didScrollTo(user)
}
}