Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.42 KB

README.md

File metadata and controls

37 lines (24 loc) · 1.42 KB

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:

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.

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

Author

lm2343635, [email protected]

License

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