Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当LeftRightMargin设置较大时,例如设置成80,会发现左右两边间距不一致。 #65

Open
zhwIdea opened this issue Jul 29, 2022 · 1 comment

Comments

@zhwIdea
Copy link

zhwIdea commented Jul 29, 2022

例如加载了5张图片,中间放大的图片是第三张,左右两边分别是第二张和第四张图。发现左边第二张图明显变大了,导致左边间距变小。
出现这种问题的原因是:在refreshVisibleCellAppearance方法中,for循环遍历计算大小,计算第二张图的大小时,delta这个绝对值应该大于等于pageSize.width,结果却是绝对值小于pageSize.width,然后进入了小于的if条件中,最后再去计算cell的frame发现宽高变大了,和第四张图的宽高不一致,所以导致间距的大小显示不一致。

@PageGuo
Copy link
Owner

PageGuo commented Jul 29, 2022

很久没有维护了,之前实现效果的方法有些繁琐,空了我会考虑其他方案。如果不满足你的需求,先考虑使用其他的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants