title: RxSwift: enable/disable button based on textfields are not empty
body: <p>I have to enable a button based on the characters count on two textfields using RxSwift</p>
  
  <pre><code>@IBOutlet weak var userTextField: UITextField!
  @IBOutlet weak var passwordTextField: UITextField!
  @IBOutlet weak var buttonToEnableDisable: UIButton!
  
  var enabledObservable = combineLatest(userTextField.rx_text, passwordTextField.rx_text) 
  { (user,password) in
     self.loginButton.enabled = a.characters.count &gt; 0 &amp;&amp; b.characters.count &gt; 0
  }
  </code></pre>
  
  <p>Finally i acomplish by doing this, but i'm not sure if its the best way:</p>
  
  <pre><code>    _ = combineLatest(emailTextField.rx_text, passwordTextField.rx_text) { (a: String, b:String) in
          self.loginButton.enabled = (a.characters.count &gt; 0 &amp;&amp; b.characters.count &gt; 0)
      }.subscribeNext { (result) -&gt; Void in
      }
  </code></pre>
  
  <p>Edit final version:</p>
  
  <pre><code>    _ = combineLatest(emailTextField.rx_text, passwordTextField.rx_text) { (a: String, b:String) in
          return (a.characters.count &gt; 0 &amp;&amp; b.characters.count &gt; 0)
          }.subscribeNext { enabled in
              self.loginButton.alpha = enabled ? 1 : 0.5
              self.loginButton.enabled = enabled
          }
          .addDisposableTo(disposeBag)
  </code></pre>