This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// anwswer to http://stackoverflow.com/questions/41915285/polling-with-rxswift-and-parse-server | |
func myObs() -> Observable<Int> { | |
return Observable<Int>.create { observer in | |
let sig = Observable<Int>.interval(1.0, scheduler: MainScheduler.instance) | |
let subscription = | |
sig.subscribe(onNext: { num in | |
observer.onNext(num) | |
if num == 10 { |