From 607ebfbf3d8ceb27867ab6fe6df83c21d933c1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=BB=E7=AB=AFCarl?= Date: Thu, 19 May 2016 23:24:35 +0800 Subject: [PATCH 1/4] Fix Demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The output is of "concat example" is : Next(🍎) Next(🍐) Next(🍊) Next(🐱) Next(🐭) If people do not use 'concat()', the result is the same, the demo cannot show the effect of 'concat()', which is "waiting for each sequence to terminate successfully before emitting elements from the next sequence" so I add one line code for better demonstration. --- .../Contents.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift index e3f8598f..398abac4 100644 --- a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift @@ -61,6 +61,7 @@ example("concat") { variable.value = subject2 + subject2.onNext("I would be ignored") subject2.onNext("🐱") subject1.onCompleted() From 5269932678da8b51d9c06ae23c7f786578df48b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Garci=CC=81a?= Date: Sat, 21 May 2016 17:05:14 +0200 Subject: [PATCH 2/4] Fix spelling and reactivate access to preferences panel Related to Pull Request: https://github.com/ReactiveX/RxSwift/pull/623/files --- .../GeolocationExample/GeolocationViewController.swift | 5 ++--- RxExample/RxExample/Services/GeolocationService.swift | 4 ++-- RxExample/RxExample/iOS/RootViewController.swift | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift b/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift index 06d0189e..996aff56 100644 --- a/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift +++ b/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift @@ -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() { diff --git a/RxExample/RxExample/Services/GeolocationService.swift b/RxExample/RxExample/Services/GeolocationService.swift index d94ea8e3..b807b2c9 100644 --- a/RxExample/RxExample/Services/GeolocationService.swift +++ b/RxExample/RxExample/Services/GeolocationService.swift @@ -16,7 +16,7 @@ import CoreLocation class GeolocationService { static let instance = GeolocationService() - private (set) var autorized: Driver + private (set) var authorized: Driver private (set) var location: Driver 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) diff --git a/RxExample/RxExample/iOS/RootViewController.swift b/RxExample/RxExample/iOS/RootViewController.swift index ecfc20e9..283975c6 100644 --- a/RxExample/RxExample/iOS/RootViewController.swift +++ b/RxExample/RxExample/iOS/RootViewController.swift @@ -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 From 3693809b34306e0beb37470ff05b2f58b7e76878 Mon Sep 17 00:00:00 2001 From: Ilya Laryionau Date: Sun, 22 May 2016 22:58:49 +0200 Subject: [PATCH 3/4] fix typo --- RxCocoa/Common/CocoaUnits/Driver/Driver.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxCocoa/Common/CocoaUnits/Driver/Driver.swift b/RxCocoa/Common/CocoaUnits/Driver/Driver.swift index d12f9393..a7227ca6 100644 --- a/RxCocoa/Common/CocoaUnits/Driver/Driver.swift +++ b/RxCocoa/Common/CocoaUnits/Driver/Driver.swift @@ -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.** */ From d1713a8ac55f87870bf4d8a710fbf119871fba51 Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Thu, 26 May 2016 04:17:52 +0900 Subject: [PATCH 4/4] Fix typo in Documentation/Units.md --- Documentation/Units.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Units.md b/Documentation/Units.md index ccf273e5..77dd5976 100644 --- a/Documentation/Units.md +++ b/Documentation/Units.md @@ -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 = Drive.just(11) +let d: Driver = Driver.just(11) driver.map { $0 / 0.5 } = ... ```