0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Combineメモ

Posted at

RxSwift での UIButton のタップ処理のイベント購読コード例
button.rx.tap
.subscribe(onNext: {[unowned self] _ in
// 何かの処理
})
.disposed(by: disposeBag)

Combine Cocoa での UIButton のタップ処理のイベント購読コード例
button.tapPublisher.sink {
// 何かの処理
}
.store(in: &cancellables)

tapPublisherが提供されてるからできる

combineだけなら

Combine のイベント購読コード例
publisher.sink {
// 何かの処理
}
.store(in: &cancellables)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?