Coder Social home page Coder Social logo

yonat / stepprogressview Goto Github PK

View Code? Open in Web Editor NEW
368.0 9.0 26.0 201 KB

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

License: MIT License

Swift 87.48% Ruby 12.52%
uiprogressview uiactivityindicatorview progress timeline swift

stepprogressview's Introduction

StepProgressView

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

Swift Version Build Status License CocoaPods Compatible
Platform PRs Welcome

Usage

let progressView   = StepProgressView(frame: view.bounds)
progressView.steps = ["First", "Second", "Third", "Last"]
progressView.details = [0: "The beginning", 3: "The end"] // appears below step title

progressView.currentStep = 0 // started first step
...
progressView.currentStep = 4 // all done

SwiftUI Usage

StepsView(currentStep: $step, steps: ["First", "Second", "Third", "Done"])
    .stepShape(.rhombus)

Changing Appearance

The properties below can be set in Interface Builder, in code, or through a UIAppearance proxy (e.g., StepProgressView.appearance().stepShape = .circle). When using SwiftUI you can set them in the StepsView initializer or using SwiftUI view modifiers.

Shape of the step icons:

progressView.stepShape = .circle
progressView.firstStepShape = .rhombus
progressView.lastStepShape = .square
// also available: .triangle, .downTriangle

Text fonts and sizes:

progressView.textFont = myFont
progressView.detailFont = anotherFont

Line size spacing:

progressView.lineWidth = 2.5
progressView.verticalPadding = 8 // between steps (0 => default based on textFont)
progressView.horizontalPadding: 8 // between shape and text (0 => default based on textFont)

Colors:

progressView.tintColor = myGeneralTintColor

// alternatively:

progressView.currentStepColor = .red
progressView.pastStepColor = .gray
progressView.futureStepColor = .gray

progressView.currentStepFillColor = .yellow
progressView.pastStepFillColor = .gray
progressView.futureStepFillColor = .lightGray

progressView.currentTextColor = .blue
progressView.pastTextColor = .gray
progressView.futureTextColor = .lightGray
progressView.currentDetailColor = .cyan // nil => use currentStepColor

Installation

CocoaPods:

pod 'StepProgressView'

Legacy versions:

Swift version StepProgressView version
4.0 (Xcode 9.4) pod 'MiniLayout', '~> 1.2.1'
pod 'StepProgressView', '~> 1.4.1'
3 pod 'MiniLayout', '~> 1.1.0'
pod 'StepProgressView', '~> 1.3.0'
2.3 pod 'MiniLayout', '~> 1.0.1'
pod 'StepProgressView', '~> 1.2.1'

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/yonat/StepProgressView", from: "1.6.5")
]

Meta

@yonatsharon

https://github.com/yonat/StepProgressView

stepprogressview's People

Contributors

yonat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stepprogressview's Issues

Reversed Flow

Hi, How can I reversed the steps for example the last step would be on upper most .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.