Skip to content

Instantly share code, notes, and snippets.

@charlag
Created August 20, 2016 16:31
Show Gist options
  • Save charlag/8f14b0db7a22da3b8ebae793ec1bea32 to your computer and use it in GitHub Desktop.
Save charlag/8f14b0db7a22da3b8ebae793ec1bea32 to your computer and use it in GitHub Desktop.
footerButton.rx_tap
.asObservable()
.withLatestFrom(screenState.asObservable())
.map { state -> LoginScreenState in
switch state {
case .ShowLogIn:
return .ShowSignUp
case .ShowSignUp:
return .ShowLogIn
}
}
.bindTo(screenState)
.addDisposableTo(disposeBag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment