Stepperier 1.1.0

Stepperier 1.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2017
SwiftSwift Version 3.0.2
SPMSupports SPM

Maintained by David Elsonbaty.



Requierments

  • Swift 3+
  • iOS 9.0+

Installation

Manually

If you prefer not to use either of the cocoapods, you can integrate Stepperier into your project manually by downloading the source files and integrating the Pod directory in your project.


Usage

Quick Start

import Stepperier

class MyViewController: UIViewController {

    lazy var stepperier = Stepperier()

    override func viewDidLoad() {
        super.viewDidLoad()

        // Add as subview of the view controller's view
        view.addSubview(stepperier)

        // Setup layout constraints
        stepperier.translatesAutoresizingMaskIntoConstraints = false
        stepperier.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
        stepperier.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true

        // Add value change observing
        stepperier.addTarget(self, action: #selector(stepperierValueDidChange(_:)), for: .valueChanged)
    }
    
    @IBAction func stepperierValueDidChange(_ stepper: Stepperier) {
        print("Updated value: \(stepper.value)")
    }
}

You may add a UIView inside your xib and set its custom class to Stepperier making sure the module is autofilled with the Stepperier module.

Contribution

Contributions are welcomed and encouraged .

Contact

David Elsonbaty

Credits

License

Stepperier is released under the MIT license. See LICENSE for details.