Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devxoul/RxViewController
RxSwift wrapper for UIViewController and NSViewController
https://github.com/devxoul/RxViewController
rxswift
Last synced: about 2 months ago
JSON representation
RxSwift wrapper for UIViewController and NSViewController
- Host: GitHub
- URL: https://github.com/devxoul/RxViewController
- Owner: devxoul
- License: mit
- Created: 2017-05-20T19:03:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-28T09:39:21.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T13:49:59.128Z (3 months ago)
- Topics: rxswift
- Language: Swift
- Homepage:
- Size: 26.4 KB
- Stars: 346
- Watchers: 6
- Forks: 63
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rxswift - RxViewController
- awesome - RxViewController - RxSwift wrapper for UIViewController and NSViewController (OOM-Leaks-Crash / Rx Series)
- awesome - RxViewController - RxSwift wrapper for UIViewController and NSViewController (OOM-Leaks-Crash / Rx Series)
README
# RxViewController
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
[![CocoaPods](http://img.shields.io/cocoapods/v/RxViewController.svg)](https://cocoapods.org/pods/RxViewController)
[![Build Status](https://travis-ci.org/devxoul/RxViewController.svg?branch=master)](https://travis-ci.org/devxoul/RxViewController)
[![codecov](https://img.shields.io/codecov/c/github/devxoul/RxViewController.svg)](https://codecov.io/gh/devxoul/RxViewController)RxSwift wrapper for UIViewController and NSViewController.
## At a Glance
In the view controller:
```swift
self.rx.viewDidLoad
.subscribe(onNext: {
print("viewDidLoad 🎉")
})
```## APIs
```swift
extension Reactive where Base: UIViewController {
var viewDidLoad: ControlEventvar viewWillAppear: ControlEvent
var viewDidAppear: ControlEventvar viewWillDisappear: ControlEvent
var viewDidDisappear: ControlEventvar viewWillLayoutSubviews: ControlEvent
var viewDidLayoutSubviews: ControlEventvar willMoveToParentViewController: ControlEvent
var didMoveToParentViewController: ControlEventvar didReceiveMemoryWarning: ControlEvent
}
``````swift
public extension Reactive where Base: NSViewController {
var viewDidLoad: ControlEventvar viewWillAppear: ControlEvent
var viewDidAppear: ControlEventvar viewWillDisappear: ControlEvent
var viewDidDisappear: ControlEventvar viewWillLayout: ControlEvent
var viewDidLayout: ControlEvent
}
```## Installation
* **Using [CocoaPods](https://cocoapods.org)**:
```ruby
pod 'RxViewController'
```* **Using [Carthage](https://github.com/Carthage/Carthage)**:
```
github "devxoul/RxViewController"
```## Contributing
Any discussions and pull requests are welcomed 💖
To create a Xcode project:
```console
$ swift package generate-xcodeproj
```## License
RxViewController is under MIT license. See the [LICENSE](LICENSE) file for more info.