Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let username = usernameTextField
- .rx
- .text
- .orEmpty
- .map({ (text) -> Bool in
- text.count > 5
- })
- let password = passwordTextField
- .rx
- .text
- .orEmpty
- .map({ (text) -> Bool in
- text.count > 5
- })
- Observable.combineLatest(username, password) { (username, password) in
- username && password
- }.bind(to: loginButton.rx.isEnabled)
- .disposed(by: disposeBag)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement