rx
UIKit 컴포넌트의 이벤트들을 Observable
로 변환해주는 기능을 한다.
컴포넌트.rx.이벤트
방식으로 작성한다.
1
2
3
4
5
let button = UIButton()
button.rx.tap
.subscribe(onNext: { print("버튼 클릭됨") })
.disposed(by: disposeBag)
This post is licensed under CC BY 4.0 by the author.