gpt4 book ai didi

ios - 如果设置动画, 'scrollToItemAtIndexPath' 方法需要多长时间?

转载 作者:行者123 更新时间:2023-11-28 19:36:22 27 4
gpt4 key购买 nike

我想通过调用“scrollToItemAtIndexPath”方法在 UICollectionView 中完成动画后做一些事情,但我不知道需要多长时间。有文档提到过吗?

PS.我知道“延迟做某事(可能是 1 秒/2 秒)”是一种解决方法。

提前致谢。

最佳答案

UICollectionView 是 UIScrollView 的子类,UICollectionViewDelegate 遵循 UIScrollViewDelegate。因此,您可以使用 UICollectionView 委托(delegate)的 scrollViewDidEndScrollingAnimation: 方法。

关于ios - 如果设置动画, 'scrollToItemAtIndexPath' 方法需要多长时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38476538/

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