SDCycleScrollView 的 bug

邰钟展
2023-12-01

SDCycleScrollView一共有四张图 第三张的时候会回滚到第一张,按理说应该是无限滚动。

造成原因:我用的masonry布局,没有提前计算宽度高度导致的举个例子。

这么写是正常滚动
[self.cycleSecrollView mas_makeConstraints:^(MASConstraintMaker *make) {

    make.width.mas_equalTo(100);
    make.height.mas_equalTo(111);
    make.centerY.centerX.offset(0);
}];

这么写会出现bug
[self.cycleSecrollView mas_makeConstraints:^(MASConstraintMaker *make) {

    make.left.top.offset(100);
    make.right.bottom.offset(-100);
}];
 类似资料: