Skip to content

kamrul-cse/MKStepper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKStepper

CI Status Version License Platform

Example

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

Screenshots:

Simply Add UIView to your Storyboard and then change the class to StepperView.

You can set min and max value. By default it set to 1...5

Now your stepper is ready! Run and check it. Cheers ✌️!

Sample Usage:

import UIKit
import MKStepper

class ViewController: UIViewController {

    @IBOutlet weak var stepperView: MKStepperView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        stepperView.delegate = self
        stepperView.stepperValue = 2
        stepperView.minValue = 1
        stepperView.maxValue = 5
        stepperView.color = UIColor.red
    }
}

extension ViewController: StepperViewDelegate {
    func valueDidChange(value: Int) {
        print(value)
    }
    func reachedAtMin(value: Int) {
        print("Reached at min")
    }
    func reachedAtMax(value: Int) {
        print("Reached at max")
    }
}

Installation

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

pod 'MKStepper'

Author

Md. Kamrul Hasan [email protected]

Copyright © [email protected]

License

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