iPhone : How to detect the end of slider drag?

后端 未结 16 2665
不思量自难忘°
不思量自难忘° 2020-12-02 07:36

How to detect the event when the user has ended the drag of a slider pointer?

16条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 08:23

    RxSwift:

    self.slider.rx.controlEvent([.touchUpInside, .touchUpOutside])
        .bind(to: self.viewModel.endSlidingSlider)
        .disposed(by: self.disposeBag)
    

提交回复
热议问题