PagerTabStripView - open source library built in SwiftUI

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.

5 Likes

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.

3 Likes

You have onPageAppear(), but no onPageDisappear()? And why this is not simply onAppear() and onDisappear()?

How is this different from TabView and .tabViewStyle(.page)?

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:

  1. 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.
  2. 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.
  3. Each pagerTabItem view can be of different type.
  4. 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.

2 Likes
Terms of Service

Privacy Policy

Cookie Policy