Giter Site home page Giter Site logo

jksteppedprogressbar's Introduction

JKSteppedProgressBar

CI Status Version Platform License

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

To use JKSteppedProgressBar Xcode 8.0 or later is required

Installation

JKSteppedProgressBar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'JKSteppedProgressBar'

JKSteppedProgressBar can be added and configured directly from storyboard.

How to Add Stepped Progress Bar

  • Add a blank UIView and set constraints
  • Set the Class & Module from identity inspector
  • Set the active & inactive color from Attributes inspector

setting custom title

  • Use the IBOutlet instance to set properties
  • Set your title array to titles property
  progressbar.titles = ["Step 1", "Step 2", "Step 3"]

setting custom title and images

  • Use the IBOutlet instance to set properties
  • Set your title array to titles property
  • Set your images array to images property
  progressbar.titles = ["Step 1", "Step 2", "Step 3"]
  progressbar.images = [
    UIImage(named: "DaisyDuck")!,
    UIImage(named: "MickeyMouse")!,
    UIImage(named: "MinnieMouse")!,
  ]

setting custom color for the progress

  • after setting your titles or images, set the property activeStepColors
progressbar.activeStepColors = [
  UIColor.red,
  UIColor.orange,
  UIColor.green,
]
  • this will change the color whenever you are at that step. For example, when you are at step 1, it will be red. And in second step, the whole progress bar will become orange and when you are at the last step, it will be green. So that the user will get a feeling of accomplishment through the steps.

setting custom active-images

  • this will make it possible to use this as progress for forms
  • Set your images to activeImages property
  • Set your tintActiveImage to tint the images to the active color (default: false)
  • Set your justCheckCompleted to select everything behind the current step but keep the current step highlighted (default: true)
  progressbar.activeImages = [
      UIImage(named: "check")!,
      UIImage(named: "check")!,
      UIImage(named: "check")!,
  ]
  progressbar.tintActiveImage = true
  progressbar.justCheckCompleted = false

Demo

Demo Video

TODO

  • Add image for steps
  • Respect language direction for drawing

Author

License

JKSteppedProgressBar is available under the MIT license. See the LICENSE file for more info.

jksteppedprogressbar's People

Contributors

jkmathew avatar jayahariv avatar g00m avatar

Watchers

James Cloos avatar

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.