Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RxSwift - Resolution of TestScheduler

yimajo
January 28, 2019

RxSwift - Resolution of TestScheduler

yimajo

January 28, 2019
Tweet

More Decks by yimajo

Other Decks in Technology

Transcript

  1. %FCPVODF ʢ௓ͶฦΓ੍ޚʣ let ݁Ռ = searchBar.rx.text.orEmpty .debounce(0.3, scheduler: scheduler) .flatMapLatest

    { text in guard !text.isEmpty else { return Observable.just([]).materialize() } return wikipediaAPI .search(from: text) .materialize() }
  2. $0/7&35      WJSUVBMUJNF EFCPVODF 3FBMUJNF<TFD> EFCPVODF

    7JSUVBM5JNF<UJDL> UJDLSFBMUJNFSFTPMVUJPO SFTPMVUJPOSFBMUJNFUJDL   
  3. /** Creates a new test scheduler. - parameter initialClock: Initial

    value for the clock. - parameter resolution: Real time [NSTimeInterval] = ticks * resolution - parameter simulateProcessingDelay: When true, if something is scheduled right `now`, it will be scheduled to `now + 1` in virtual time. */ public init(initialClock: TestTime, resolution: Double = 1.0, simulateProcessingDelay: Bool = true) { _simulateProcessingDelay = simulateProcessingDelay super.init(initialClock: initialClock, converter: TestSchedulerVirtualTimeConverter(resolution: resolution)) } IUUQTHJUIVCDPN3FBDUJWF93Y4XJGUCMPC3Y5FTU4DIFEVMFST 5FTU4DIFEVMFSTXJGU