Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
e902c8b7f6
|
|
@ -71,7 +71,7 @@ Rx units define operations by using corresponding observable sequence operations
|
|||
The `map` operation on `Driver` is defined using the `map` operation on its observable sequence.
|
||||
|
||||
```swift
|
||||
let d: Driver<Int> = Drive.just(11)
|
||||
let d: Driver<Int> = Driver.just(11)
|
||||
driver.map { $0 / 0.5 } = ...
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ example("concat") {
|
|||
|
||||
variable.value = subject2
|
||||
|
||||
subject2.onNext("I would be ignored")
|
||||
subject2.onNext("🐱")
|
||||
|
||||
subject1.onCompleted()
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ extension Driver where Element: SignedIntegerType {
|
|||
|
||||
/**
|
||||
This method can be used in unit tests to ensure that driver is using mock schedulers instead of
|
||||
maind schedulers.
|
||||
main schedulers.
|
||||
|
||||
**This shouldn't be used in normal release builds.**
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ class GeolocationViewController: ViewController {
|
|||
|
||||
let geolocationService = GeolocationService.instance
|
||||
|
||||
geolocationService.autorized
|
||||
geolocationService.authorized
|
||||
.drive(noGeolocationView.rx_driveAuthorization)
|
||||
.addDisposableTo(disposeBag)
|
||||
/*
|
||||
|
||||
geolocationService.location
|
||||
.drive(label.rx_driveCoordinates)
|
||||
.addDisposableTo(disposeBag)
|
||||
|
|
@ -67,7 +67,6 @@ class GeolocationViewController: ViewController {
|
|||
self?.openAppPreferences()
|
||||
}
|
||||
.addDisposableTo(disposeBag)
|
||||
*/
|
||||
}
|
||||
|
||||
private func openAppPreferences() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import CoreLocation
|
|||
class GeolocationService {
|
||||
|
||||
static let instance = GeolocationService()
|
||||
private (set) var autorized: Driver<Bool>
|
||||
private (set) var authorized: Driver<Bool>
|
||||
private (set) var location: Driver<CLLocationCoordinate2D>
|
||||
|
||||
private let locationManager = CLLocationManager()
|
||||
|
|
@ -26,7 +26,7 @@ class GeolocationService {
|
|||
locationManager.distanceFilter = kCLDistanceFilterNone
|
||||
locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation
|
||||
|
||||
autorized = Observable.deferred { [weak locationManager] in
|
||||
authorized = Observable.deferred { [weak locationManager] in
|
||||
let status = CLLocationManager.authorizationStatus()
|
||||
guard let locationManager = locationManager else {
|
||||
return Observable.just(status)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class RootViewController : UITableViewController {
|
|||
DefaultWireframe.sharedInstance
|
||||
MainScheduler.instance
|
||||
let geoService = GeolocationService.instance
|
||||
geoService.autorized.driveNext { _ in
|
||||
geoService.authorized.driveNext { _ in
|
||||
|
||||
}.dispose()
|
||||
geoService.location.driveNext { _ in
|
||||
|
|
|
|||
Loading…
Reference in New Issue