RxSwift - Resolution of TestScheduler

7d1521d950d9bc5697868830cb04ff2f?s=47 yimajo
January 28, 2019

RxSwift - Resolution of TestScheduler

7d1521d950d9bc5697868830cb04ff2f?s=128

yimajo

January 28, 2019
Tweet

Transcript

  1. 3Y4XJGU 3FTPMVUJPOPG5FTU4DIFEVMFS QPUBUPUJQT !ZJNBKP

  2. "HFOEB w 3Y4XJGUݚڀಡຊ w "CPVU3Y4XJGU w 5FTUJOHZPVS3Y4XJGUAEFCPVODFA

  3. IUUQTTXJGUCPPUIQN

  4. "CPVU3Y4XJGU w 3FBDUJWF&YUFOTJPOGPS4XJGU w 3FBDUJWF1SPHSBNNJOH w ʜCVUOPUl5SVF'31zʢ3Y͸ਅͷ'31Ͱ͸ͳ͍ʣ

  5. 5FTUJOHZPVS3Y4XJGU AEFCPVODFA

  6. %FCPVODF ʢ௓ͶฦΓ੍ޚʣ

  7. %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() }
  8. 5FTU

  9. 5FTU w FYQFDUUPFWFOUJOTFD w FYQFDUUPFWFOUJOTFD   EFCPVODF  

           <TFD>
  10. ͔͠͠ʜ

  11. 5IF7JSUVBM5JNF6OJU JT*OU      WJSUVBMUJNF 

  12. $0/7&353&"-5*.& 50 7*356"-5*.&

  13. $0/7&35      WJSUVBMUJNF EFCPVODF 3FBMUJNF<TFD> EFCPVODF

    7JSUVBM5JNF<UJDL> 
  14. $0/7&35      WJSUVBMUJNF EFCPVODF 3FBMUJNF<TFD> EFCPVODF

    7JSUVBM5JNF<UJDL> UJDLSFBMUJNFSFTPMVUJPO SFTPMVUJPOSFBMUJNFUJDL   
  15. /** 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
  16. 3Y4XJGUݚڀಡຊΛ·Ͱʹ ϨϏϡʔͯ͘͠ΕΔਓΛืू͍ͯ͠·͢ %.Λ͍ͩ͘͞