Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. let username = usernameTextField
  2. .rx
  3. .text
  4. .orEmpty
  5. .map({ (text) -> Bool in
  6. text.count > 5
  7. })
  8.  
  9.  
  10. let password = passwordTextField
  11. .rx
  12. .text
  13. .orEmpty
  14. .map({ (text) -> Bool in
  15. text.count > 5
  16. })
  17.  
  18. Observable.combineLatest(username, password) { (username, password) in
  19. username && password
  20. }.bind(to: loginButton.rx.isEnabled)
  21. .disposed(by: disposeBag)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement