SamuKata
kavsoft
kavsoft

patreon


SwiftUI Animated Carousel Slider With Paging Control - iOS 17 - Xcode 15

Source Code For SwiftUI Animated Carousel Slider With Paging Control - iOS 17 - Xcode 15.

Download Code 👇

SwiftUI Animated Carousel Slider With Paging Control - iOS 17 - Xcode 15

Comments

Kavsoft, I am trying to achieve something based on your example but unfortunately I am not able to and I want to understand what is happening. I want to have your ContentView (containing the carousel) as a child to another view and to control the activeID from the out side. For example, on the main page I want to list all items and when clicking on one of the items to navigate to this ContentView, displaying all items as a carousel. When clicking on the 3rd item, I want the carousel to be shown directly on that item, not from the first item. My issue is that the carousel is not properly aligned when doing this and sometimes is not even positioned on the correct item, but a different one. In order to achieve this, I changed the HStack to LazyHStack inside CustomPagingSlider and also stored the activeID on the parent view and pass it down as @Binding to ContentView and then to CustomPagingSlider, but I am facing the above issues. Do you know how can I solve this?

Robert Iulian Basamac

A version of your custom sliding nav bar selector that uses this updated modern approach would also be great. (So that selected title and page content are aligned but also move / select while scrolling. E.g. Airbnb)

Grumpity

So cool! Thanks for doing this. Can you guys do one where a user can add new slide to the slider end. Also an option to add new slides to the front\begenning of the slider.

Dmitriy


More Creators