replayAll

· iOS/RxSwift
이번 글에서는 Time base의 Operator를 정리해봅니다. replay subscribe를 했을 때, replay대상이 이전에 방출했던 element를 buffer만큼 다시 방출시켜주는 Operator입니다. replay를 지정해주고 connect()를 호출해주어야 합니다. print("- - - - - replay - - - - -") let shinee = PublishSubject() let replay = shinee.replay(2) replay.connect() // replay와 같은 연산자들은 connect를 해주어야 함 shinee.onNext("링딩동 링딩동") shinee.onNext("링디기딩디기딩딩딩") replay .subscribe(onNext: { print($0) }..
SwiftyCody
'replayAll' 태그의 글 목록