项目作者: lm2343635

项目描述 :
Screen orientation notification extension based on RxSwift
高级语言: Swift
项目地址: git://github.com/lm2343635/RxOrientation.git
创建时间: 2018-11-15T09:59:14Z
项目社区:https://github.com/lm2343635/RxOrientation

开源协议:MIT License

下载


RxOrientation

CI Status
Version
License
Platform

RxOrientation is a screen orientation notification extension for RxSwift, which transforms the state of screen orientation notifications into RxSwift Observables.

Example

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

Installation

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

  1. pod 'RxOrientation'

In your view model class or view controller class, using UIDevice.current.rx.orientation to get the current device orientaion and UIApplication.shared.rx.statusBarOrientation to get the status bar orientaion.

  1. UIApplication.shared.rx.statusBarOrientation.subscribe(onNext: { orientaion in
  2. // ...
  3. }).disposed(by: disposeBag)

Author

lm2343635, lm2343635@126.com

License

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