Skip to content

MrRealBlack/StepperView

Repository files navigation

StepperView

Custom stepper view built in SwiftUI

Swift Platforms Swift Package Manager

Simulator Screen Shot - iPhone 12 - 2022-02-11 at 18 46 39 2

Run Requirements

  • iOS 13.0+
  • Xcode 11+
  • Swift 5+

Installation

Swift Package Manager

In Xcode 11 or greater, navigate to File > Swift Packages > Add Package Dependency.... From there just simply add https://github.com/MrRealBlack/StepperView as the package repository url and use the main branch or the most recent version.

How to use?

Using Stepper View is very simple. Just need to create an inatanse of StepperView and give it your items as StepModel.

    @State var currentState = 1

    let steps = [
        StepModel(stepNumber: 1, title: "One"),
        StepModel(stepNumber: 2, title: "Two"),
        StepModel(stepNumber: 3, title: "Three"),
        StepModel(stepNumber: 4, title: "Four"),
        StepModel(stepNumber: 5, title: "‍Five")
    ]
    
     StepperView(steps: steps, currentStep: $currentState, direction: .leftToRight)
     .frame(width: metrics.size.width, height: 100)
     .padding(.top, 10)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages