Infinite-Auto-Scroll Collection View by Compositional Layout
I answered to this stackoverflow problem.
This is a feature demo project inspired by the UI design requirement I encountered at work and also a possible solution thatFeatures
- The banner can scroll to next item automatically or manually
- User can swipe to next item even when auto-scrolling enabled
- The banner is displayed in infinite loop effect
- Use
UICollectionViewCompositionalLayout
for building layout simply - Can be easily set up on storyboard
- Page control, auto-scrolling, and scrolling time interval can be customized
Development Environment
- Swift 5
- iOS 15.4
- Xcode 13.3.1
- macOS Monterey version 12.3
Getting Started
Clone repo or download .zip
files and open .xcodeproj
file then you can build on your computer
Acknowledgments
Credit Photo by JOSHUA COLEMAN on Unsplash
Contact
Rachel Chen rachel.hp.chen@gmail.com