Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can we use viewForSupplementaryElementOfKind collectionView method for TableView? Is there a different method?

I’m pulling data using API and it comes to me in chunks of 20. I need to get this data by scrolling. In Collection View I do this using viewForSupplementaryElementOfKind. Which method should I use for Table View?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

When you have a paginated endpoint, generally the solution is to implement the scrollViewDidScroll delegate method and check the value of the contentOffset against the contentInset and contentSize.

When this check detects that the user is at or near the bottom, make the next call.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading