apptekstudios / ASCollectionView

A SwiftUI collection view with support for custom layouts, preloading, and more.
MIT License
1.36k stars 160 forks source link

Data paging #146

Closed isakovarseniy closed 3 years ago

isakovarseniy commented 4 years ago

Hello Is it possible to enable data paging. For example I have database with multiple rows. I need to display my data page by page.

Thanks Arseniy Isakov

apptekstudios commented 4 years ago

I can think of a few options here: 1) You could use a UICollectionViewLayout that includes paging support 2) You could pass ASCollectionView just the data for the currently visible page, and change the data passed as needed

Additionally you can use the onReachedBoundary call to extend how much of your data you are displaying (see the Insta demo page for an example of this)