SamSuka
kavsoft
kavsoft

patreon


SwiftUI 3.0 Snap Carousel Slider - Carousel List - Xcode 13 - WWDC 2021

Source Code For SwiftUI 3.0 Snap Carousel Slider - Carousel List - Xcode 13 - WWDC 2021.

NOTE: Updated Version Needs Xcode 15.

Download Code 👇

SwiftUI 3.0 Snap Carousel Slider - Carousel List - Xcode 13 - WWDC 2021

Comments

Until iOS 16, there was no way other than using custom views, but this can be achieved natively using the iOS 17 new APIs.

Kavsoft

Is there another solution like Tabview? I'm only interested in seeing the previous and next tab. So that the user knows that it can be scrolled.

Kornel Krużewski

Thanks for the lesson, your implementation of the carousel helped a lot

Дмитрий Павлов

Is it possible to programmatically navigate to a certain card (index) with animation. Mutate the currentIndex state?

Benny Chew

The whole thing breaks if you have 25+

Rob Nash

Also, there are some performance issues, if you have more than 10 items. I think the better approach is with a scroll view.

Eldin

Hihi, I love these creative ideas and coding, but every now and then I have problems. They don't run properly in Xcode and on the iPhone. I have all the latest versions of Apple on it, so it's not that. With this carousel, the swipe hacks and if the user leaves the finger on the content for a longer time, the content flickers back and forth and leaks. Why is that? Greetings Jan (j.sonnentag@twadoo.com)

Jan Sonnentag


More Creators