Skip to content

Commit f86e0b9

Browse files
devxoulkzaher
authored andcommitted
Add Playground page
1 parent f8d41e6 commit f86e0b9

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*:
2+
> # IMPORTANT: To use **Rx.playground**:
3+
1. Open **Rx.xcworkspace**.
4+
1. Build the **RxSwift-macOS** scheme (**Product** → **Build**).
5+
1. Open **Rx** playground in the **Project navigator**.
6+
1. Show the Debug Area (**View** → **Debug Area** → **Show Debug Area**).
7+
*/
8+
import RxSwift
9+
/*:
10+
# Try Yourself
11+
12+
It's time to play with Rx 🎉
13+
*/
14+
playgroundShouldContinueIndefinitely()
15+
16+
example("Try yourself") {
17+
// let disposeBag = DisposeBag()
18+
_ = Observable.just("Hello, RxSwift!")
19+
.debug("Observable")
20+
.subscribe()
21+
// .disposed(by: disposeBag) // If dispose bag is used instead, sequence will terminate on scope exit
22+
}

Rx.playground/contents.xcplayground

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<page name='Error_Handling_Operators'/>
1414
<page name='Debugging_Operators'/>
1515
<page name='Enable_RxSwift.resourceCount'/>
16+
<page name='Playground'/>
1617
</pages>
1718
</playground>

0 commit comments

Comments
 (0)