Skip to content

RxSwift wrapper for UIViewController and NSViewController

License

Notifications You must be signed in to change notification settings

devxoul/RxViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

072b223 Β· Feb 2, 2021

History

45 Commits
Feb 9, 2019
Oct 1, 2018
May 20, 2017
Jun 14, 2019
May 20, 2017
Jan 26, 2021
Jan 26, 2021
Jun 14, 2019
Feb 2, 2021
Jul 7, 2017

Repository files navigation

RxViewController

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"
    

Contributing

Any discussions and pull requests are welcomed πŸ’–

To create a Xcode project:

$ swift package generate-xcodeproj

License

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

About

RxSwift wrapper for UIViewController and NSViewController

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published