Step into Swift logo

What is the Sample Operator in RxSwift?

Sample Operator

RxSwift: Sample Operator


  • Emits the most recent element emitted by an Observable within a periodic time interval.
  • Similar to withLatestFrom, however sample takes a trigger Observable as a parameter.
  • When the tigger Observable ends, the most recent element from the source Observable will emit.



< All Posts