[英]How to use CLLocation extension in RxSwift
我想在RxSwift
中使用CLLocationManager
https://github.com/ReactiveX/RxSwift/issues/413
但我发现CLLocationManager
扩展已移至RxExample
(这里提到https://github.com/ReactiveX/RxSwift/issues/900 )。
我的问题是:如何使用该代码? 当我导入RxSwift
和RxCocoa
我无法访问例如locationManager.rx.didUpdateLocations
。 我应该怎么做才能将CoreLocation
与RxSwift
CoreLocation
使用?
我正在使用 Xcode 8、Swift 3。
在此先感谢您的帮助!
我发现建议现在我们必须从RxExample
复制并粘贴CLLocationManager
扩展(详细信息在该提交的评论中)。
您必须将扩展CLLocationManager + Rx.swift和RxCLLocationManagerDelegateProxy.swift复制到您的项目,因为它不再是RxCocoa的一部分
对于通过Google发现此问题的任何人,Rx位置管理器功能已移至: https : //github.com/RxSwiftCommunity/RxCoreLocation,因此不再需要手动复制和粘贴文件。
https://github.com/RxSwiftCommunity/RxCoreLocation未更新。 甚至不能移动自述文件中的示例代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.