Skip to content

AnthonyMDev/ReactiveUIKit

 
 

Repository files navigation

ReactiveUIKit

ReactiveUIKit is a framework from ReactiveKit collection of frameworks that extends UIKit objects with bindings. Consult ReactiveKit documentation to learn how to work with the Observables it provides.

All extensions are prefixed with r so you can learn them on the fly as you work. Just start typing .r on instance of any UIKit object to see what's available.

ReactiveUIKit supports iOS and tvOS.

extension UILabel {
  public var rText: Observable<String?>
  public var rAttributedText: Observable<NSAttributedString?>
  public var rTextColor: Observable<UIColor?>
}
extension UITextView {
  public var rText: Observable<String?>
  public var rAttributedText: Observable<NSAttributedString?>
  public var rTextColor: Observable<UIColor?>
}
extension UITextField {
  public var rText: Observable<String?>
  public var rAttributedText: Observable<NSAttributedString?>
  public var rTextColor: Observable<UIColor?>
}
extension UIImageView {
  public var rImage: Observable<UIImage?>
}
extension UINavigationItem {
  public var rTitle: Observable<String?>
}
extension UIProgressView {
  public var rProgress: Observable<Float>
}
extension UIBarItem {
  public var rTitle: Observable<String?>
  public var rImage: Observable<UIImage?>
  public var rEnabled: Observable<Bool>
}
extension UIActivityIndicatorView {
  public var rAnimating: Observable<Bool>
}
extension UISlider {
  public var rValue: Observable<Float>
}
extension UIRefreshControl {
  public var rRefreshing: Observable<Bool>
}
extension UISwitch {
  public var rOn: Observable<Bool>
}
extension UISegmentedControl {
  public var rSelectedSegmentIndex: Observable<Int>
}
extension UIRefreshControl {
  public var rRefreshing: Observable<Bool>
}
extension UIDatePicker {
  public var rDate: Observable<NSDate>
}
extension UIButton {
  public var rTitle: Observable<String?>
  public var rTap: ActiveStream<Void>
  public var rSelected: Observable<Bool>
  public var rHighlighted: Observable<Bool>
}
extension UIControl {
  public var rControlEvent: ActiveStream<UIControlEvents>
  public var rEnabled: Observable<Bool>
}
extension UIView {
  public var rAlpha: Observable<CGFloat>
  public var rBackgroundColor: Observable<UIColor?>
  public var rHidden: Observable<Bool>
  public var rUserInteractionEnabled: Observable<Bool>
  public var rTintColor: Observable<UIColor?>
}
extension ObservableCollectionType where Collection == Array<Generator.Element> {
  public func bindTo(tableView: UITableView, createCell: (NSIndexPath, ObservableCollection<Collection>, UITableView) -> UITableViewCell) -> DisposableType
}
extension ObservableCollectionType where Collection == Array<Generator.Element> {
  public func bindTo(collectionView: UICollectionView, createCell: (NSIndexPath, ObservableCollection<Collection>, UICollectionView) -> UICollectionViewCell) -> DisposableType
}

Installation

CocoaPods

pod 'ReactiveKit', '~> 1.0'
pod 'ReactiveUIKit', '~> 1.0'
pod 'ReactiveFoundation', '~> 1.0'

Carthage

github "ReactiveKit/ReactiveKit" 
github "ReactiveKit/ReactiveUIKit"
github "ReactiveKit/ReactiveFoundation"

License

The MIT License (MIT)

Copyright (c) 2015 Srdan Rasic (@srdanrasic)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Reactive UIKit

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 97.9%
  • Ruby 1.2%
  • Objective-C 0.9%