Skip to content

Instantly share code, notes, and snippets.

@yonivav
Last active February 24, 2019 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonivav/a662d58b6efb878867a13a818a38a249 to your computer and use it in GitHub Desktop.
Save yonivav/a662d58b6efb878867a13a818a38a249 to your computer and use it in GitHub Desktop.
class MyView: UIView {
.
.
.
init() {
self.rx
.swipeGesture(.up)
.when(.ended)
.subscribe { [weak self] swipeGestureRecognizer in
guard let self = self else { return }
self.viewModel.viewDidSwipe.onNext(swipeGestureRecognizer)
}
.disposed(by: bag)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment