gut*_*tte 4 uikit ios uicollectionview swift
使用collectionView.scrollToItem时IndexPath.是否可以设置自定义滚动速度?
对的,这是可能的.试试这个:
UIView.animate(withDuration: 5, animations: { [weak self] in
self?.collectionView.scrollToItem(at: IndexPath(item: 10, section: 10), at: .middle, animated: false)
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1153 次 |
| 最近记录: |