Minor update to Rx.playground
This commit is contained in:
parent
b37f3f5bb6
commit
ab4c845d46
|
|
@ -31,7 +31,7 @@ func sampleWithoutConnectableOperators() {
|
|||
}
|
||||
}
|
||||
|
||||
// sampleWithoutConnectableOperators() // ⚠️ Uncomment to run this example; comment to stop running
|
||||
//sampleWithoutConnectableOperators() // ⚠️ Uncomment to run this example; comment to stop running
|
||||
/*:
|
||||
> `interval` creates an `Observable` sequence that emits elements after each `period`, on the specified scheduler. [More info](http://reactivex.io/documentation/operators/interval.html)
|
||||

|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ example("catchErrorJustReturn") {
|
|||
example("catchError") {
|
||||
let disposeBag = DisposeBag()
|
||||
|
||||
let sequenceThatErrors = PublishSubject<String>()
|
||||
let sequenceThatFails = PublishSubject<String>()
|
||||
let recoverySequence = PublishSubject<String>()
|
||||
|
||||
sequenceThatErrors
|
||||
sequenceThatFails
|
||||
.catchError {
|
||||
print("Error:", $0)
|
||||
return recoverySequence
|
||||
|
|
@ -51,18 +51,18 @@ example("catchError") {
|
|||
.subscribe { print($0) }
|
||||
.addDisposableTo(disposeBag)
|
||||
|
||||
sequenceThatErrors.onNext("😬")
|
||||
sequenceThatErrors.onNext("😨")
|
||||
sequenceThatErrors.onNext("😡")
|
||||
sequenceThatErrors.onNext("🔴")
|
||||
sequenceThatErrors.onError(Error.Test)
|
||||
sequenceThatFails.onNext("😬")
|
||||
sequenceThatFails.onNext("😨")
|
||||
sequenceThatFails.onNext("😡")
|
||||
sequenceThatFails.onNext("🔴")
|
||||
sequenceThatFails.onError(Error.Test)
|
||||
|
||||
recoverySequence.onNext("😊")
|
||||
}
|
||||
/*:
|
||||
----
|
||||
## `retry`
|
||||
Recovers repeatedly Error events by rescribing to the `Observable` sequence, indefinitely. [More info](http://reactivex.io/documentation/operators/retry.html)
|
||||
Recovers repeatedly Error events by resubscribing to the `Observable` sequence, indefinitely. [More info](http://reactivex.io/documentation/operators/retry.html)
|
||||

|
||||
*/
|
||||
example("retry") {
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@
|
|||
C8CC3E731C95CB5300ABA17E /* _RXObjCRuntime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _RXObjCRuntime.m; sourceTree = "<group>"; };
|
||||
C8CC3E741C95CB5300ABA17E /* CLLocationManager+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CLLocationManager+Rx.swift"; sourceTree = "<group>"; };
|
||||
C8CC3E761C95CB5300ABA17E /* ControlEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlEvent.swift; sourceTree = "<group>"; };
|
||||
C8CC3E771C95CB5300ABA17E /* ControlProperty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlProperty.swift; sourceTree = "<group>"; };
|
||||
C8CC3E771C95CB5300ABA17E /* ControlProperty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlProperty.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
|
||||
C8CC3E791C95CB5300ABA17E /* ControlEvent+Driver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ControlEvent+Driver.swift"; sourceTree = "<group>"; };
|
||||
C8CC3E7A1C95CB5300ABA17E /* ControlProperty+Driver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ControlProperty+Driver.swift"; sourceTree = "<group>"; };
|
||||
C8CC3E7B1C95CB5300ABA17E /* Driver+Operators+arity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Driver+Operators+arity.swift"; sourceTree = "<group>"; };
|
||||
|
|
|
|||
Loading…
Reference in New Issue