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

reloadData的能否让他不滚动到第一页. #21

Open
CXTretar opened this issue May 23, 2017 · 2 comments
Open

reloadData的能否让他不滚动到第一页. #21

CXTretar opened this issue May 23, 2017 · 2 comments

Comments

@CXTretar
Copy link

我想添加一个删除的操作,但是已删除刷新就滚到了第一页, 能做到刷新之后是相邻页面么?

@PageGuo
Copy link
Owner

PageGuo commented May 23, 2017

目前不支持,后期考虑。

@zhwIdea
Copy link

zhwIdea commented Jul 29, 2022

reloadData后,如果想让它滚动到指定的卡片位置。可以按以下步骤执行:
1:将指定卡片的下标index赋值给cardView的currentPageIndex,然后再执行reloadData方法。
2: 在reloadData方法里:计算setContentOffset中,将currentPageIndex和self.orginPageCount相加,这样就能刷新后回到指定的位置。

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

3 participants