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 ProgressTabView
import SwiftUI
enum ProgressTab: ProgressTabContent, CaseIterable {
case first
case second
case third
var totalTime: TimeInterval {
switch self {
case .first: 3
case .second: 6
case .third: 9
}
}
var body: some View {
Group {
switch self {
case .first: Text("1")
case .second: Text("2")
case .third: Text("3")
}
}
.font(.largeTitle)
}
}
- Then, use
ProgressTabView
in your SwiftUI view:
import ProgressTabView
import SwiftUI
struct ContentView: View {
var body: some View {
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
)