I am building a custom infinite page control to sync with a horizontally scrolling UICollectionView. The design should resemble Instagram’s Stories indicator. I want to implement this myself but am unsure how to structure it.
Requirements:
The page control should:
Handle infinite scrolling (wrap around smoothly when scrolling past the start or end).
Be customizable (e.g., size, color, spacing).
Sync with a UICollectionView (the active indicator should match the current page).
Be lightweight and UX-friendly for a large number of items.
What I’ve Tried:
UIPageControl:
Works for small datasets but doesn’t handle large datasets well.
Third-party libraries:
CHIPageControl: Offers great animations but no infinite support.
ImageSlideShow: Too focused on image transitions, not suitable for syncing with UICollectionView.
Challenges:
Making the indicators “infinite” so they visually wrap around.
Managing performance and clarity for large datasets (e.g., 50+ items).
Syncing the active indicator with the UICollectionView’s scroll position.
KARTIKEN BARNWAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.