gpt4 book ai didi

ios - UICollectionView.scrollToItem 设置动画速度

转载 作者:搜寻专家 更新时间:2023-10-31 08:16:04 24 4
gpt4 key购买 nike

collectionView.scrollToItemIndexPath 一起使用时。是否可以设置自定义滚动速度?

最佳答案

是的,这是可能的。试试这个:

UIView.animate(withDuration: 5, animations: { [weak self] in
self?.collectionView.scrollToItem(at: IndexPath(item: 10, section: 10), at: .middle, animated: false)
})

关于ios - UICollectionView.scrollToItem 设置动画速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51503205/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com