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

Anyway to allow for infinite scrolling? #29

Open
rmehta33 opened this issue Mar 25, 2019 · 5 comments
Open

Anyway to allow for infinite scrolling? #29

rmehta33 opened this issue Mar 25, 2019 · 5 comments
Assignees

Comments

@rmehta33
Copy link

Hello,

Is there a way to do infinite scrolling? In UITableView it's relatively simple using scrollViewDidScroll, but I can't find something similar for this library.

Please help!

@pavankataria
Copy link
Owner

How are you achieving this with that delegate method with UITableView?

I'm presuming the implementation here, if you change the y offset position to go back to the top, but wouldn't the velocity suddenly change during a scroll and it coming to a half after the offset? aka it does not continue scrolling after changing the offset to give the effect of infinite scrolling

@rmehta33
Copy link
Author

rmehta33 commented Apr 9, 2019

So first I check whether I need to generate more data (using y offset), and then if I do, add the new data, reload the table, and scroll to the new last element using scrollToRow with the ".none" option. Not sure how it works behind the scenes, but there are plenty of articles online that go more in depth.

@pavankataria pavankataria self-assigned this Jun 18, 2019
@vahidnety
Copy link

Any update for this?

@vahidnety
Copy link

So first I check whether I need to generate more data (using y offset), and then if I do, add the new data, reload the table, and scroll to the new last element using scrollToRow with the ".none" option. Not sure how it works behind the scenes, but there are plenty of articles online that go more in depth.

Have you found solution for this case?

@pavankataria
Copy link
Owner

In order for this to be achievable we must have first class support to add elements and reload efficiently without redrawing everything. This is one reason why this hasn't been explored further.

I'm currently focused on self sizing cells to to support a couple of features.
I believe if this prototype proves successful the ability to add infinite scrolling will come for free.

I'll post on this issue directly about the results of my prototype. It will take a while to get this working.
So far I've been able to achieve self sizing if the text gets larger, but there's still a lot of work to be done in order for the remaining cells to also have the same height as the tallest cell in the row.
Screenshot 2020-06-26 at 13 59 54

Stay tuned.

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