Skip to content

kazuki-horie-m/RxOrientation

 
 

Repository files navigation

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.

About

Screen orientation notification extension based on RxSwift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 84.8%
  • Ruby 15.2%