Successfully reported this slideshow.
Your SlideShare is downloading. ×

今日こそ理解するHot変換

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 55 Ad

More Related Content

Recently uploaded (20)

Advertisement

今日こそ理解するHot変換

  1. 1. Hot @ RxSwift
  2. 2. https://speakerdeck.com/ukitaka/cold-at-she-nei-rxswiftmian-qiang-hui
  3. 3. Hot
  4. 4. Cold → Hot
  5. 5. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  6. 6. publish()
  7. 7. Question1
  8. 8. 1,2,3
  9. 9. Sequence Map Hot subscribe
  10. 10. Sequence Map Hot subscribe
  11. 11. Answer …
  12. 12. A.
  13. 13. !?
  14. 14. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  15. 15. Hot 1 ConnectableObservable
  16. 16. publish() …
  17. 17. ConnectableObservable • connect() • connect() Hot • connect() Observer
  18. 18. ConnectableObservable
  19. 19. • observer Hot connect() observer subscribe
  20. 20. (ConnectableObservable )
  21. 21. ConnectableObservable Operator • multicast() • publish() • replay(bufferSize:) • replayAll()
  22. 22. multicast() • Hot Subject • multicast() Subject Operator
  23. 23. multicast()
  24. 24. publish() • PublishSubject multicast
  25. 25. • ReplaySubject multicast replay(bufferSize:) / replayAll()
  26. 26. ConnectableObservable • Cold Observable multicast() / publish() / replay(bufferSize:) / replayAll() ConnectableObservable • ConnectableObservable connect() Hot Observable
  27. 27.
  28. 28. ConnectableObservable
  29. 29. Hot Operator
  30. 30. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  31. 31. share()
  32. 32. share() ConnectableObservable Observable Hot
  33. 33. Question2
  34. 34. Answer …
  35. 35. A.
  36. 36. ) ?
  37. 37. Hot 2 : RefCount
  38. 38. share()
  39. 39. refCount() • refCount() ConnectableObservable Operator
  40. 40. refCount() • Hot • Hot subscribe refCount Hot subscribe
  41. 41. refCount() • subscribe connect()
  42. 42. Question3
  43. 43. Answer …
  44. 44. A. 1,2,3
  45. 45. Hot ( )
  46. 46. Operator
  47. 47. shareReplay(bufferSize:) • share + replay • share = publish + refCount • shareReplay = publish + refCount + replay • Hot subscribe replay
  48. 48. shareReplay(bufferSize:) • RxSwift Example • shareReplay(1) ( ) • RxSwift v2.5.0 shareReplay 1 share
  49. 49. shareReplayLatestWhileConnected() • • RxSwift(RxCocoa) Driver • ShareReplay1 connect 1 .Completed replay .Completed • Driver
  50. 50. Hot Hot • ConnectableObservable connect() • RefCount 1 subscribe

×