Latest 0.2.0
Homepage https://github.com/devxoul/RxViewController
License MIT
Platforms ios 8.0, osx 10.11
Dependencies RxSwift, RxCocoa
Frameworks Foundation
Authors

Swift
CocoaPods
Build Status
codecov

RxSwift wrapper for UIViewController and NSViewController.

At a Glance

In the view controller:

self.rx.viewDidLoad
  .subscribe(onNext: {
    print("viewDidLoad 🎉")
  })

APIs

extension Reactive where Base: UIViewController {
  var viewDidLoad: ControlEvent<Void>

  var viewWillAppear: ControlEvent<Bool>
  var viewDidAppear: ControlEvent<Bool>

  var viewWillDisappear: ControlEvent<Bool>
  var viewDidDisappear: ControlEvent<Bool>

  var viewWillLayoutSubviews: ControlEvent<Void>
  var viewDidLayoutSubviews: ControlEvent<Void>

  var willMoveToParentViewController: ControlEvent<UIViewController?>
  var didMoveToParentViewController: ControlEvent<UIViewController?>

  var didReceiveMemoryWarning: ControlEvent<Void>
}
public extension Reactive where Base: NSViewController {
  var viewDidLoad: ControlEvent<Void>

  var viewWillAppear: ControlEvent<Void>
  var viewDidAppear: ControlEvent<Void>

  var viewWillDisappear: ControlEvent<Void>
  var viewDidDisappear: ControlEvent<Void>

  var viewWillLayout: ControlEvent<Void>
  var viewDidLayout: ControlEvent<Void>
}

Installation

  • Using CocoaPods:

    pod 'RxViewController'
  • Using Carthage:

    github "devxoul/RxViewController"

License

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

Latest podspec

{
    "name": "RxViewController",
    "version": "0.2.0",
    "summary": "RxSwift wrapper for UIViewController and NSViewController",
    "homepage": "https://github.com/devxoul/RxViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Suyeol Jeon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devxoul/RxViewController.git",
        "tag": "0.2.0"
    },
    "source_files": "Sources/*.swift",
    "frameworks": "Foundation",
    "dependencies": {
        "RxSwift": [
            ">= 3.0.0"
        ],
        "RxCocoa": [
            ">= 3.0.0"
        ]
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.11"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This