Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SwiftUI library for adding a view that displays a horizontally scrollable collection of tabs with progress indicators.

License

NotificationsYou must be signed in to change notification settings

Sedlacek-Solutions/ProgressTabView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Features

  • 🔄 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)

Requirements

  • iOS 17.0+
  • Swift 6+
  • Xcode 16.0+

Installation

Swift Package Manager

Add ProgressTabView to your project through Xcode:

  1. File > Add Packages
  2. Enter package URL:https://github.com/Sedlacek-Solutions/ProgressTabView.git
  3. Select version requirements
  4. Click Add Package

Usage

  1. First, create your tab content by conforming toProgressTabContent:
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)}}
  1. Then, useProgressTabView in your SwiftUI view:
import ProgressTabViewimport SwiftUIstructContentView:View{varbody:someView{ProgressTabView(tabs:ProgressTab.allCases)}}

Interaction

  • 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

Customization

You can customize the progress increment amount when initializing the view:

ProgressTabView(    tabs: tabs,    incrementAmount:0.05 // Updates every 0.05 seconds)

About

SwiftUI library for adding a view that displays a horizontally scrollable collection of tabs with progress indicators.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp