UIKevent 0.1.1

UIKevent 0.1.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Saulo Tauil.



UIKevent 0.1.1

  • By
  • Saulo Tauil

UIKevent

Example

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

Requirements

Installation

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

pod "UIKevent"

Usage

The controls supported are

  • UIBarButtonItem
  • UIButton
  • UISegmentedControl
  • UIStepper
  • UISlider
  • UISwitch
  • UIDatePicker

It is still required to import UIKevent. I recomend doing thins only in the AppDelegate.swift

import UIKevent
barButton.onClick {_ in
    print("BarButtonItem Clicked");
};

button.onClick { (btn) in
    print("Button clicked");
}

switchControl.onChange(handler: { ctrl in
    print("UISwitch changed");

})

slider.onChange { (sld) in
    print("slider change to \(sld.value)");
}

stepper.onChange { (obj) in
    print("stepper change to \(obj.value)");
}

segControll.onChange { (obj) in
    print("seg change to \(obj.selectedSegmentIndex)");
}

Author

Saulo Tauil

License

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