RxOrientation 0.1.4

RxOrientation 0.1.4

[Meng Li]维护。



 
依赖关系
RxSwift~> 5
RxCocoa~> 5
 

  • lm2343635

RxOrientation

CI Status Version License Platform

RxOrientation是RxSwift的一个屏幕方向通知扩展,它将屏幕方向通知的状态转换为RxSwift的Observables。

示例

要运行示例项目,请克隆仓库,然后从Example目录首先运行pod install

安装

RxOrientation可通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中

pod 'RxOrientation'

在您的视图模型类或视图控制器类中使用UIDevice.current.rx.orientation来获取当前设备方向,并使用UIApplication.shared.rx.statusBarOrientation来获取状态栏方向。

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

作者

lm2343635, [email protected]

许可证

RxOrientation 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。