PagerTabStripView is a pager view built in pure SwiftUI. It provides a component to create interactive pager views which contains child views. It allows the user to switch between your views either by swiping or tapping a tab bar item.
Is there Swift Package Manager SPM?
I guess any repository with a Package.swift in it can be used as a Swift Package, so in this case you can just add
.package(url: "https://github.com/xmartlabs/PagerTabStripView.git", from: "3.0.0")
to your package dependencies.
onPageAppear(), but no
onPageDisappear()? And why this is not simply
How is this different from
Page swipe only work on top of content, swipe on empty area do not work? Should work like TabView
Unlike Apple's TabView it provides:
- Flexible way to fully customize pager tab views. In TabView you can only pass an image and a label. In PagerTabStripView you can set any kind of view.
- Indicator view indicates the selected child view. You can't get the offset when you scroll using the TabView, for this reason, you can't implement an indicator bar.
- Each pagerTabItem view can be of different type.
- Ability to update pagerTabItem according to highlighted, selected, normal state.
Regarding the onPageAppear, we're discussing deprecating it since you can implement it on the user side using onChange of selection.
The swipe works in all your page view. If you want it to cover all the screen you can set the frame. We don't modify yours views.