apptekstudios / ASCollectionView

A SwiftUI collection view with support for custom layouts, preloading, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data paging

isakovarseniy opened this issue · comments

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

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)