Skip to content

New functionality: Swipe between pages#12

Open
ayakutt wants to merge 2 commits into
QuynhNguyen:masterfrom
ayakutt:swipe-pages
Open

New functionality: Swipe between pages#12
ayakutt wants to merge 2 commits into
QuynhNguyen:masterfrom
ayakutt:swipe-pages

Conversation

@ayakutt

@ayakutt ayakutt commented Jan 31, 2023

Copy link
Copy Markdown

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

@ayakutt

ayakutt commented Feb 2, 2023

Copy link
Copy Markdown
Author

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