A SwiftUI package that provides a custom tab view with progress tracking functionality.
Each tab can have its own duration and automatically advances when completed.
- 🔄 Automatic progress tracking for each tab
- ⏱️ Customizable duration for each tab
- 👆 Gesture-based navigation (tap left/right)
- 📱 Swipe between tabs
- ⏸️ Long press to pause progress
- 📱 Full SwiftUI implementation
- 🔄 Circular navigation (wraps around)
- iOS 17.0+
- Swift 6+
- Xcode 16.0+
Add ProgressTabView to your project through Xcode:
- File > Add Packages
- Enter package URL:
https://github.com/Sedlacek-Solutions/ProgressTabView.git
- Select version requirements
- Click Add Package
- First, create your tab content by conforming to
ProgressTabContent
:
import ProgressTabViewimport SwiftUIenumProgressTab:ProgressTabContent,CaseIterable{case firstcase secondcase thirdvartotalTime:TimeInterval{switchself{case.first:3case.second:6case.third:9}}varbody:someView{Group{switchself{case.first:Text("1")case.second:Text("2")case.third:Text("3")}}.font(.largeTitle)}}
- Then, use
ProgressTabView
in your SwiftUI view:
import ProgressTabViewimport SwiftUIstructContentView:View{varbody:someView{ProgressTabView(tabs:ProgressTab.allCases)}}
- Swipe left or right to navigate between tabs
- Tap the right side of a tab to advance to the next tab
- Tap the left side of a tab to go back to the previous tab
- Long press to pause the progress timer
- Release long press to resume the timer
You can customize the progress increment amount when initializing the view:
ProgressTabView( tabs: tabs, incrementAmount:0.05 // Updates every 0.05 seconds)