Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality: Swipe between pages #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ayakut16
Copy link

@ayakut16 ayakut16 commented Jan 31, 2023

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

Screen.Recording.2023-01-31.at.18.45.36.mov

@ayakut16
Copy link
Author

ayakut16 commented Feb 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant