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")
}
}
MKStepper is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MKStepper'
Md. Kamrul Hasan [email protected]
Copyright © [email protected]
MKStepper is available under the MIT license. See the LICENSE file for more info.