gsdios / SDCycleScrollView

Autoscroll Banner. 无限循环图片、文字轮播器。
MIT License
6.18k stars 1.5k forks source link

此方法无效‘- (void)makeScrollViewScrollToIndex:(NSInteger)index’ #706

Open xiangzq opened 2 years ago

xiangzq commented 2 years ago

这个方法并没有效果,无法指定轮播图滚动到‘index’页

lifangchao123 commented 2 years ago

找到解决方案了嘛?作者能否出来解答一下。

18840851520 commented 2 years ago

替换成这个方法

  • (void)makeScrollViewScrollToIndex:(NSInteger)index{ if (self.autoScroll) { [self invalidateTimer]; } if (0 == _totalItemsCount) return;
if (self.infiniteLoop) {
    [self scrollToIndex:(int)(_totalItemsCount * 0.5 + index)];
}else{
    [self scrollToIndex:(int)index];
}

if (self.autoScroll) {
    [self setupTimer];
}

}

wlyy460 commented 7 months ago

在非循环下无法正常使用的问题,目前最新版本未修复更新

chinaiOSSwift commented 7 months ago

你好,你发给我的邮件已收到,看到邮件我会主动与你联系!谢谢!