-
Notifications
You must be signed in to change notification settings - Fork 45
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
Bottom view Scrolls to Top when tableview reloads and row height changed #19
Comments
@OfTheWolf can you please help me in this? |
@mohanthakur92 Can you share a minimum sample project to replicate this please? |
@OfTheWolf ok i will share the sample code. Basically in the bottom tabs i used tableview and when i reload tableview and scrolls it tableview moves to top (its insets changes) |
I believe it's caused by bottom tableview/scrollview content size changed(estimatedRowHeight tableView when scrolls to bottom, or load more) --> overlayScrollView content size change --> overlayScrollView scrolls --> bottom tableview/scrollview scrolls(here causes Scrolls to Top even if revert contentOffset.Y, and drag scroll gesture will be interrupted) private func updateOverlayScrollContentSize(with bottomView: UIView) {
let contentOffsetY = overlayScrollView.contentOffset.y
self.overlayScrollView.contentSize = getContentSize(for: bottomView)
if contentOffsetY > 0 {
// revert contentOffsetY after contentSize changes, but still not perfect
self.overlayScrollView.setContentOffset(.init(x: 0, y: contentOffsetY), animated: false)
}
} |
@hstdt @mohanthakur92 I'm having same issue, did you guys solve it? |
When I use table view with static cell size everything works fine but when I use table view with dynamic cell size, the scrolling is lagging specially when scrolling up |
No, you can try this one. https://github.com/pujiaxin33/JXPagingView |
Thank you, I've used it it's great |
@OfTheWolf I am using this library and i am using tableview in the bottomView i am having expand and collapse functionality when i expand and reload table the bottom view scroll ups and starts from top.
Any solution is appreciated
The text was updated successfully, but these errors were encountered: