SwiftUI TabView vs ScrollView for Infinite Horizontal Carousel with Page Control
Hi all,
I am trying to create an infinite horizontal carousel with page control. After the last page the scrollview should show the first page and vice versa while scrolling backwards. Most of the posts I see are using a TabView, instead of a ScrollView for this purpose.
I am trying to create an infinite horizontal carousel with page control. After the last page the scrollview should show the first page and vice versa while scrolling backwards. Most of the posts I see are using a TabView, instead of a ScrollView for this purpose.
- Is TabView a better option for this use case?
- What are the benefits of using TabView vs ScrollView?