iCarousel 自动滚动不流畅

Posted

技术标签:

【中文标题】iCarousel 自动滚动不流畅【英文标题】:iCarousel auto scrolling not appearing smoothly 【发布时间】:2013-04-03 14:34:16 【问题描述】:

当我为自动滚动 0.0333 指定 timeInterval 时,自动滚动看起来很流畅。但是,如果我将 timeInterval 指定为自动滚动 5.0 秒,则自动滚动不会显得平滑。 iCarousel 中是否有动画时长?

【问题讨论】:

你如何自动滚动 iCarousel? 以前,我使用基于偏移量的自动滚动,因此遇到了问题。我通过使用scrollToItemAtIndex而不是使用偏移来克服。它解决了我的问题。 【参考方案1】:

试试这个。

[_icarousel scrollByNumberOfItems:85 duration:10];//scrolls 85 items in 10 seconds

【讨论】:

【参考方案2】:

转到 iCarousel.m 文件并在 setUp 方法中添加以下代码行。

- (void)setUp
 
   _autoscroll=1;

【讨论】:

以上是关于iCarousel 自动滚动不流畅的主要内容,如果未能解决你的问题,请参考以下文章

iCarousel 自动滚动效果

自动滚动时如何使用 iCarousel 设置每个项目的显示时间

旋转后的错误,使用 iCarousel 作为滚动视图

如何在icarousel ios中找到特定索引?

iCarousel 滚动不顺畅

表格单元格视图中的 iCarousel 视图根本不滚动