ZKCycleScrollViewDemo-OC icon indicating copy to clipboard operation
ZKCycleScrollViewDemo-OC copied to clipboard

加载默认不显示第1张 闪一下才回到第一张

Open BeingCode opened this issue 4 years ago • 5 comments

服务器请求了5张图显示的时候会先跳到第4张然后才显示第1张, 正常应该直接显示第1张,闪的非常快,不知道这是什么原因

BeingCode avatar May 11 '21 02:05 BeingCode

默认先跳到倒数第二张图然后闪到第一张,体验很不好

BeingCode avatar May 11 '21 10:05 BeingCode

把这行代码注了试试。

在 2021-05-11 17:12:03,"BeingCode" @.***> 写道:

如果<直接加在控制器上>默认都会直接滚动到倒数第二张图,demo也存在

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bestDew avatar May 11 '21 10:05 bestDew

检查下你是否调用了这个API:

  • (void)scrollToItemAtIndex:(NSInteger)index animated:(BOOL)animated;

去设置默认显示页,如果有,注释掉相关代码试试。

在 2021-05-11 18:05:16,"BeingCode" @.***> 写道:

默认先跳到倒数第二张图然后闪到第一张,体验很不好

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bestDew avatar May 11 '21 10:05 bestDew

@bestDew 没有用这个方法,3q, 麻烦看一下

https://user-images.githubusercontent.com/44461496/117811086-bd8c7400-b292-11eb-972e-b66da7112634.mp4

BeingCode avatar May 11 '21 11:05 BeingCode

把这行代码注了试试。 在 2021-05-11 17:12:03,"BeingCode" @.***> 写道: 如果<直接加在控制器上>默认都会直接滚动到倒数第二张图,demo也存在 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

注释哪一行

BeingCode avatar May 12 '21 02:05 BeingCode