SlidingTabView
SlidingTabView copied to clipboard
New functionality: Swipe between pages
Added this new functionality requested in #5 which I think is quite useful. The functionality backed by native TabView component with .tabViewStyle(.page)
which is only available after iOS 14, thus I updated the availability.
Also the pages do not have to be separate components now, they can be passed as we do in TabView, e.g:
SlidingTabView(selection: self.$selectedTabIndex, tabs: ["First", "Second"]) {
Text("First View")
Text("Second View")
}
Note that this change is not backward compatible so I believe increasing the version to 2.0 is necessary.
In the first commit removed @State
and used the @Binding
property instead this also Fixes #7 and Fixes #10.
Fixes #5
https://user-images.githubusercontent.com/9766788/215855151-8d50381c-57da-402a-832c-81f63da578c1.mov
This repo seems to be abandoned, I forked it and added this feature: https://github.com/ayakut16/SlidingTabView
If this ever comes back to life again, please let me know, I'd be happy to continue here.