From 8b9bbff4ee5f89b4972eea261cff86e6ef5f16ec Mon Sep 17 00:00:00 2001 From: Mateusz Derks Date: Fri, 4 Mar 2016 14:05:28 +0100 Subject: [PATCH 1/8] Adds 'rx_badgeValue' to UITabBarItem --- Documentation/API.md | 8 +++++ Rx.xcodeproj/project.pbxproj | 14 ++++++++ RxCocoa/iOS/UITabBarItem+Rx.swift | 30 +++++++++++++++++ Tests/RxCocoaTests/UITabBarItem+RxTests.swift | 33 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 RxCocoa/iOS/UITabBarItem+Rx.swift create mode 100644 Tests/RxCocoaTests/UITabBarItem+RxTests.swift diff --git a/Documentation/API.md b/Documentation/API.md index 32651338..74d11aae 100644 --- a/Documentation/API.md +++ b/Documentation/API.md @@ -455,3 +455,11 @@ extension NSTextField { } ``` + +```swift +extension UITabBarItem { + + public var rx_badgeValue: AnyObserver {} + +} +``` diff --git a/Rx.xcodeproj/project.pbxproj b/Rx.xcodeproj/project.pbxproj index 41c88143..4f76e921 100644 --- a/Rx.xcodeproj/project.pbxproj +++ b/Rx.xcodeproj/project.pbxproj @@ -11,6 +11,11 @@ 79E9DE8A1C3417FD009970AF /* DispatchQueueSchedulerQOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79E9DE881C3417FD009970AF /* DispatchQueueSchedulerQOS.swift */; }; 79E9DE8B1C3417FD009970AF /* DispatchQueueSchedulerQOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79E9DE881C3417FD009970AF /* DispatchQueueSchedulerQOS.swift */; }; 79E9DE8C1C3417FD009970AF /* DispatchQueueSchedulerQOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79E9DE881C3417FD009970AF /* DispatchQueueSchedulerQOS.swift */; }; + 7EDBAEB41C89B1A6006CBE67 /* UITabBarItem+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDBAEAB1C89B1A5006CBE67 /* UITabBarItem+RxTests.swift */; }; + 7EDBAEBC1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDBAEB71C89B9B7006CBE67 /* UITabBarItem+Rx.swift */; }; + 7EDBAEBE1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDBAEB71C89B9B7006CBE67 /* UITabBarItem+Rx.swift */; }; + 7EDBAEBF1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDBAEB71C89B9B7006CBE67 /* UITabBarItem+Rx.swift */; }; + 7EDBAEC31C89BCB9006CBE67 /* UITabBarItem+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDBAEAB1C89B1A5006CBE67 /* UITabBarItem+RxTests.swift */; }; 7F600F3F1C5D0C6C00535B1D /* UIRefreshControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F600F3D1C5D0C0100535B1D /* UIRefreshControl+Rx.swift */; }; 7F600F401C5D0C6D00535B1D /* UIRefreshControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F600F3D1C5D0C0100535B1D /* UIRefreshControl+Rx.swift */; }; 7F600F411C5D0C6E00535B1D /* UIRefreshControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F600F3D1C5D0C0100535B1D /* UIRefreshControl+Rx.swift */; }; @@ -1318,6 +1323,8 @@ /* Begin PBXFileReference section */ 79E9DE881C3417FD009970AF /* DispatchQueueSchedulerQOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatchQueueSchedulerQOS.swift; sourceTree = ""; }; + 7EDBAEAB1C89B1A5006CBE67 /* UITabBarItem+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabBarItem+RxTests.swift"; sourceTree = ""; }; + 7EDBAEB71C89B9B7006CBE67 /* UITabBarItem+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabBarItem+Rx.swift"; sourceTree = ""; }; 7F600F3D1C5D0C0100535B1D /* UIRefreshControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIRefreshControl+Rx.swift"; sourceTree = ""; }; 7F600F421C5D0D2D00535B1D /* UIRefreshControl+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIRefreshControl+RxTests.swift"; sourceTree = ""; }; 842A5A281C357F7D003568D5 /* NSTextStorage+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTextStorage+Rx.swift"; sourceTree = ""; }; @@ -2203,6 +2210,7 @@ C83508F01C38706D0027C24C /* SentMessageTest.swift */, C83508F11C38706D0027C24C /* UIView+RxTests.swift */, 7F600F421C5D0D2D00535B1D /* UIRefreshControl+RxTests.swift */, + 7EDBAEAB1C89B1A5006CBE67 /* UITabBarItem+RxTests.swift */, ); path = RxCocoaTests; sourceTree = ""; @@ -2340,6 +2348,7 @@ 9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */, 8479BC4A1C3ACED100FB8B54 /* UIImagePickerController+Rx.swift */, C8BCD3EC1C14B5FB005F1280 /* UIView+Rx.swift */, + 7EDBAEB71C89B9B7006CBE67 /* UITabBarItem+Rx.swift */, ); path = iOS; sourceTree = ""; @@ -3248,6 +3257,7 @@ C882542E1B8A752B00B02D69 /* UILabel+Rx.swift in Sources */, C88254211B8A752B00B02D69 /* RxSearchBarDelegateProxy.swift in Sources */, C80DDEA71BCE69BA006A1832 /* ObservableConvertibleType+Driver.swift in Sources */, + 7EDBAEBC1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */, C839365F1C70E02200A9A09E /* UIApplication+Rx.swift in Sources */, C80DDE9F1BCE69BA006A1832 /* Driver+Subscription.swift in Sources */, C811C89D1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */, @@ -3401,6 +3411,7 @@ C83509331C38706E0027C24C /* Driver+Extensions.swift in Sources */, C835094F1C38706E0027C24C /* CurrentThreadSchedulerTest.swift in Sources */, C835093E1C38706E0027C24C /* UIView+RxTests.swift in Sources */, + 7EDBAEB41C89B1A6006CBE67 /* UITabBarItem+RxTests.swift in Sources */, C83509411C38706E0027C24C /* BackgroundThreadPrimitiveHotObservable.swift in Sources */, C83509581C38706E0027C24C /* Observable+MultipleTest+CombineLatest.swift in Sources */, C83509651C38706E0027C24C /* VirtualSchedulerTest.swift in Sources */, @@ -3486,6 +3497,7 @@ C8350A121C38756A0027C24C /* Observable+StandardSequenceOperatorsTest.swift in Sources */, C83509C31C3875220027C24C /* KVOObservableTests.swift in Sources */, C83509F91C38755D0027C24C /* MainSchedulerTests.swift in Sources */, + 7EDBAEC31C89BCB9006CBE67 /* UITabBarItem+RxTests.swift in Sources */, C83509AB1C3874D20027C24C /* XCTest+AllTests.swift in Sources */, C83509C11C3875220027C24C /* Driver+Extensions.swift in Sources */, C83509DD1C38754C0027C24C /* EquatableArray.swift in Sources */, @@ -4178,6 +4190,7 @@ C8F0C03A1BBBFBB9001B112F /* ControlTarget.swift in Sources */, C8F0C03B1BBBFBB9001B112F /* UISearchBar+Rx.swift in Sources */, C8F0C03C1BBBFBB9001B112F /* ItemEvents.swift in Sources */, + 7EDBAEBF1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */, C8DB968B1BF756F40084BD53 /* KVORepresentable+CoreGraphics.swift in Sources */, C8FD21B11C67E14C00863EC3 /* UIBindingObserver.swift in Sources */, C8F0C03D1BBBFBB9001B112F /* RxTableViewDataSourceType.swift in Sources */, @@ -4271,6 +4284,7 @@ 9D71C4D21BF08191006E8F59 /* UIButton+Rx.swift in Sources */, D203C4FD1BB9C53700D02D00 /* RxSearchBarDelegateProxy.swift in Sources */, D2138C8A1BB9BEBE00339B5C /* Logging.swift in Sources */, + 7EDBAEBE1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */, C8DB968A1BF756F40084BD53 /* KVORepresentable+CoreGraphics.swift in Sources */, C8FD21B01C67E14C00863EC3 /* UIBindingObserver.swift in Sources */, D203C50F1BB9C53E00D02D00 /* UIStepper+Rx.swift in Sources */, diff --git a/RxCocoa/iOS/UITabBarItem+Rx.swift b/RxCocoa/iOS/UITabBarItem+Rx.swift new file mode 100644 index 00000000..203a2c6e --- /dev/null +++ b/RxCocoa/iOS/UITabBarItem+Rx.swift @@ -0,0 +1,30 @@ +// +// UITabBarItem+Rx.swift +// Rx +// +// Created by Mateusz Derks on 04/03/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) + + import Foundation + import UIKit +#if !RX_NO_MODULE + import RxSwift +#endif + +extension UITabBarItem { + + /** + Bindable sink for `hidden` property. + */ + public var rx_badgeValue: AnyObserver { + return UIBindingObserver(UIElement: self) { tabBarItem, badgeValue in + tabBarItem.badgeValue = badgeValue + }.asObserver() + } + +} + +#endif diff --git a/Tests/RxCocoaTests/UITabBarItem+RxTests.swift b/Tests/RxCocoaTests/UITabBarItem+RxTests.swift new file mode 100644 index 00000000..b3a2165d --- /dev/null +++ b/Tests/RxCocoaTests/UITabBarItem+RxTests.swift @@ -0,0 +1,33 @@ +// +// UITabBarItem+RxTests.swift +// Rx +// +// Created by Mateusz Derks on 04/03/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +import RxSwift +import RxCocoa +import UIKit +import XCTest + +class UITabBarItemTests : RxTest { +} + +extension UITabBarItemTests { + func testBadgetValue_Text() { + let subject = UITabBarItem(tabBarSystemItem: .More, tag: 0) + Observable.just("5").subscribe(subject.rx_badgeValue).dispose() + + XCTAssertTrue(subject.badgeValue == "5") + } + + func testBadgetValue_Empty() { + let subject = UITabBarItem(tabBarSystemItem: .More, tag: 0) + Observable.just(nil).subscribe(subject.rx_badgeValue).dispose() + + XCTAssertTrue(subject.badgeValue == nil) + } +} From a7508fb3a755d172c6e6d2ce1eeaf4dee123de64 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sat, 5 Mar 2016 19:37:57 +0100 Subject: [PATCH 2/8] Fixes `README.md` examples. --- Documentation/Examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/Examples.md b/Documentation/Examples.md index ae81a65b..78950266 100644 --- a/Documentation/Examples.md +++ b/Documentation/Examples.md @@ -46,7 +46,9 @@ let b /*: Observable*/ = Variable(2) // b = 2 // if a + b >= 0 { // c = "\(a + b) is positive" // } -let c = Observable.combineLatest(a, b) { $0 + $1 } // combines latest values of variables `a` and `b` using `+` + + // combines latest values of variables `a` and `b` using `+` +let c = Observable.combineLatest(a.asObservable(), b.asObservable()) { $0 + $1 } .filter { $0 >= 0 } // if `a + b >= 0` is true, `a + b` is passed to map operator .map { "\($0) is positive" } // maps `a + b` to "\(a + b) is positive" From 375121f8e7934578d5c3ce31def061c348183fe8 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sat, 5 Mar 2016 21:03:16 +0100 Subject: [PATCH 3/8] Fixes using original image instead of edited image. #492 --- .../RxExample/Examples/ImagePicker/ImagePickerController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxExample/RxExample/Examples/ImagePicker/ImagePickerController.swift b/RxExample/RxExample/Examples/ImagePicker/ImagePickerController.swift index 3dd568d2..0f247051 100644 --- a/RxExample/RxExample/Examples/ImagePicker/ImagePickerController.swift +++ b/RxExample/RxExample/Examples/ImagePicker/ImagePickerController.swift @@ -68,7 +68,7 @@ class ImagePickerController: ViewController { .take(1) } .map { info in - return info[UIImagePickerControllerOriginalImage] as? UIImage + return info[UIImagePickerControllerEditedImage] as? UIImage } .bindTo(imageView.rx_image) .addDisposableTo(disposeBag) From 18acdd02ffd7408b96a069276c95f8924338e205 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sat, 5 Mar 2016 21:04:06 +0100 Subject: [PATCH 4/8] Fixes `rx_badgeValue` inline documentation. --- RxCocoa/iOS/UITabBarItem+Rx.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxCocoa/iOS/UITabBarItem+Rx.swift b/RxCocoa/iOS/UITabBarItem+Rx.swift index 203a2c6e..2d07cde4 100644 --- a/RxCocoa/iOS/UITabBarItem+Rx.swift +++ b/RxCocoa/iOS/UITabBarItem+Rx.swift @@ -17,7 +17,7 @@ extension UITabBarItem { /** - Bindable sink for `hidden` property. + Bindable sink for `badgeValue` property. */ public var rx_badgeValue: AnyObserver { return UIBindingObserver(UIElement: self) { tabBarItem, badgeValue in From dbb2261f678c211e8de328e04f95d4186dc51f92 Mon Sep 17 00:00:00 2001 From: Afonso Date: Sat, 5 Mar 2016 21:44:49 +0000 Subject: [PATCH 5/8] Fixed Grammar mistake then/than "Then" was being used as the comparison connector of some sentences. The correct word usage is "than" --- Documentation/GettingStarted.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/GettingStarted.md b/Documentation/GettingStarted.md index 0abc561a..c6039b2f 100644 --- a/Documentation/GettingStarted.md +++ b/Documentation/GettingStarted.md @@ -481,7 +481,7 @@ Disposed Ended ---- ``` -**Every subscriber upon subscription usually generates it's own separate sequence of elements. Operators are stateless by default. There is vastly more stateless operators then stateful ones.** +**Every subscriber upon subscription usually generates it's own separate sequence of elements. Operators are stateless by default. There are vastly more stateless operators than stateful ones.** ## Sharing subscription and `shareReplay` operator @@ -964,7 +964,7 @@ self.rx_observe(CGRect.self, "view.frame", retainSelf: false) ### `rx_observeWeakly` -`rx_observeWeakly` has somewhat slower then `rx_observe` because it has to handle object deallocation in case of weak references. +`rx_observeWeakly` has somewhat slower than `rx_observe` because it has to handle object deallocation in case of weak references. It can be used in all cases where `rx_observe` can be used and additionally From 6e08500ebc25145c6d531022985c3039b408dbb0 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 6 Mar 2016 22:07:58 +0100 Subject: [PATCH 6/8] Improves single operator logic. --- .../Implementations/SingleAsync.swift | 2 +- Sources/AllTests/main.swift | 2 ++ ...servable+StandardSequenceOperatorsTest.swift | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/RxSwift/Observables/Implementations/SingleAsync.swift b/RxSwift/Observables/Implementations/SingleAsync.swift index 38938144..af7a09ae 100644 --- a/RxSwift/Observables/Implementations/SingleAsync.swift +++ b/RxSwift/Observables/Implementations/SingleAsync.swift @@ -36,8 +36,8 @@ class SingleAsyncSink : S } if _seenValue == false { - forwardOn(.Next(value)) _seenValue = true + forwardOn(.Next(value)) } else { forwardOn(.Error(RxError.MoreThanOneElement)) dispose() diff --git a/Sources/AllTests/main.swift b/Sources/AllTests/main.swift index 7caa7139..d9e262f0 100644 --- a/Sources/AllTests/main.swift +++ b/Sources/AllTests/main.swift @@ -468,11 +468,13 @@ _ObservableStandardSequenceOperatorsTest.allTests = [ ("testSingle_One", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSingle_One(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), ("testSingle_Many", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSingle_Many(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), //("testSingle_Error", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSingle_Error(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), + ("testSingle_DecrementCountsFirst", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSingle_DecrementCountsFirst(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), ("testSinglePredicate_Empty", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_Empty(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), ("testSinglePredicate_One", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_One(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), ("testSinglePredicate_Many", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_Many(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), //("testSinglePredicate_Error", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_Error(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), //("testSinglePredicate_Throws", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_Throws(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), + ("testSinglePredicate_DecrementCountsFirst", { _ObservableStandardSequenceOperatorsTest.setUp(); _ObservableStandardSequenceOperatorsTest.testSinglePredicate_DecrementCountsFirst(); _ObservableStandardSequenceOperatorsTest.tearDown(); }), ] diff --git a/Tests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift b/Tests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift index 7dcf86ad..31f0858d 100644 --- a/Tests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift +++ b/Tests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift @@ -5067,6 +5067,14 @@ extension ObservableStandardSequenceOperatorsTest { Subscription(200, 210) ]) } + + func testSingle_DecrementCountsFirst() { + let k = BehaviorSubject(value: false) + + _ = k.single { _ in true }.subscribeNext { n in + k.on(.Next(!n)) + } + } func testSinglePredicate_Empty() { let scheduler = TestScheduler(initialClock: 0) @@ -5199,5 +5207,14 @@ extension ObservableStandardSequenceOperatorsTest { Subscription(200, 230) ]) } + + func testSinglePredicate_DecrementCountsFirst() { + let k = BehaviorSubject(value: false) + + _ = k.single { _ in true }.subscribeNext { n in + k.on(.Next(!n)) + } + + } } From c8aa48f32fe7c5ed2a9338e3d8a4447f57cef5fb Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 6 Mar 2016 22:49:55 +0100 Subject: [PATCH 7/8] Adds run instructions to every playground page. --- .../Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Pages/Index.xcplaygroundpage/Contents.swift | 2 +- .../Pages/Introduction.xcplaygroundpage/Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ .../Pages/Subjects.xcplaygroundpage/Contents.swift | 9 +++++++++ .../Contents.swift | 9 +++++++++ 11 files changed, 91 insertions(+), 1 deletion(-) diff --git a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift index 7887749b..b4324272 100644 --- a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift index 9da1d2ec..1e415e25 100644 --- a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import Cocoa diff --git a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift index 1bbdd93b..d43f3bf2 100644 --- a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift index 71f812ca..e7adfcc7 100644 --- a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift index 1f6406f1..8f2d260a 100644 --- a/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift index cb6598bf..7f4bb155 100644 --- a/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift @@ -1,6 +1,6 @@ /*: -> # IMPORTANT: To use `RxSamples`, please: +> # IMPORTANT: To use `RxPlaygrounds`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift index 81be41fa..acd7837b 100644 --- a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Index](@previous) import RxSwift 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 9e390081..d7de949f 100644 --- a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift index 3010400c..5b040ec6 100644 --- a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift index e74015e4..a407fbe3 100644 --- a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift diff --git a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift index f0216cf5..eb20a3f1 100644 --- a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift @@ -1,3 +1,12 @@ +/*: +> # IMPORTANT: To use `RxPlaygrounds`, please: + +1. Open `Rx.xcworkspace` +2. Build `RxSwift-OSX` scheme +3. And then open `Rx` playground in `Rx.xcworkspace` tree view. +4. Choose `View > Show Debug Area` +*/ + //: [<< Previous](@previous) - [Index](Index) import RxSwift From e5735611c96af426e558e5a33a2687d7efc121be Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 6 Mar 2016 22:51:35 +0100 Subject: [PATCH 8/8] Improves playground documentation. #531 --- .../Pages/Combining_Observables.xcplaygroundpage/Contents.swift | 2 +- .../Contents.swift | 2 +- .../Contents.swift | 2 +- .../Error_Handling_Operators.xcplaygroundpage/Contents.swift | 2 +- .../Pages/Filtering_Observables.xcplaygroundpage/Contents.swift | 2 +- Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift | 2 +- .../Pages/Introduction.xcplaygroundpage/Contents.swift | 2 +- .../Contents.swift | 2 +- .../Contents.swift | 2 +- Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift | 2 +- .../Transforming_Observables.xcplaygroundpage/Contents.swift | 2 +- Rx.playground/contents.xcplayground | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift index b4324272..8935a67f 100644 --- a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift index 1e415e25..d14a2cda 100644 --- a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift index d43f3bf2..208caf56 100644 --- a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift index e7adfcc7..206279e9 100644 --- a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift index 8f2d260a..29405905 100644 --- a/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Filtering_Observables.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift index 7f4bb155..720c1a62 100644 --- a/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Index.xcplaygroundpage/Contents.swift @@ -1,6 +1,6 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift index acd7837b..04994d5a 100644 --- a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme 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 d7de949f..a6b78f35 100644 --- a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift index 5b040ec6..a1230154 100644 --- a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift index a407fbe3..dc8df166 100644 --- a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift index eb20a3f1..57f978b5 100644 --- a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift @@ -1,5 +1,5 @@ /*: -> # IMPORTANT: To use `RxPlaygrounds`, please: +> # IMPORTANT: To use `Rx.playground`, please: 1. Open `Rx.xcworkspace` 2. Build `RxSwift-OSX` scheme diff --git a/Rx.playground/contents.xcplayground b/Rx.playground/contents.xcplayground index 0d291cc1..f511ccd7 100644 --- a/Rx.playground/contents.xcplayground +++ b/Rx.playground/contents.xcplayground @@ -1,5 +1,5 @@ - +