https://github.com/rodrigoelp/cycliccarousel
Sample code (experiment) to implement a cyclic carousel in SwiftUI.
https://github.com/rodrigoelp/cycliccarousel
carousel-component swift swiftui
Last synced: 2 months ago
JSON representation
Sample code (experiment) to implement a cyclic carousel in SwiftUI.
- Host: GitHub
- URL: https://github.com/rodrigoelp/cycliccarousel
- Owner: rodrigoelp
- License: mit
- Created: 2020-04-02T11:08:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-03T12:54:57.000Z (about 6 years ago)
- Last Synced: 2025-05-13T19:22:34.662Z (about 1 year ago)
- Topics: carousel-component, swift, swiftui
- Language: Swift
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cyclic Carousel.
Who doesn't like presenting cards on a screen and go around the world? (Flat earth believer? maybe?)
What if you need to do this in SwiftUI?
Well, wait no more. Here you will find a sample code to achieve this.
Sales pitch is over.
Basically, I was bored and saw an image of this on the internet and decided to implement it in SwiftUI.
## Requirements
- Written on xcode 11.4.
- No extra requirements.
## Pending to do:
- [ ] Use `GeometryReader`, read the size already provided on each element to set it to the internal frame.
- [ ] Allow providing the footer and header, allowing the user customise if they want it top, center or bottom aligned.
- [ ] Make it a Swift Package if the code is good enough for anybody else to use it.
- [ ] Update the documentation to explain how to use it.
- [ ] Maybe defer `views` initialization when the entire view is loaded so the impact doesn't happen on initialization of the `CarouselView`