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

JXPagerSmoothView 调用reloaddata,pagerHeaderContainerView的父视图会被多次创建 #487

Open
yunjinghui123 opened this issue Aug 24, 2023 · 1 comment

Comments

@yunjinghui123
Copy link

1、每次调用reloaddata,pagerHeaderContainerView的父视图都会重新创建一次
2、调用reloaddata,页面会回到顶部
b921d8bb0a9466e7bdbdc53862a9521d

@yunjinghui123
Copy link
Author

1、是因为在cellForItemAtIndexPath中重新创建了listHeader,但是在reloaddata中并没有完全将上一个视图移除,在reloaddata中移除就可以
for (UIView *view in self.listHeaderDict.allValues) {
[view removeFromSuperview];
}
[self.listHeaderDict removeAllObjects];
2、reloaddata中将self.currentPagerHeaderContainerViewY = 0;置为0所致,移除即可(不知道作者出于什么考虑)

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

1 participant