title: enable button with RxSwift logic
body: <p>I'm new to <code>RxSwift</code> and want to achieve the following. I have a <code>email and password TextField</code>. When you've entered a text in both <code>textfields</code> a button should be enabled. </p>
  
  <p>In my ViewController I do the following:</p>
  
  <pre><code>txtEmail.rx.text.asObservable()
    .bindTo(viewModel.email)
    .addDisposableTo(disposeBag)
  
  txtPassword.rx.text.asObservable()
    .bindTo(viewModel.password)
    .addDisposableTo(disposeBag)
  
  viewModel.buttonEnabled
    .bindTo(btnLogin.rx.isEnabled)
    .addDisposableTo(disposeBag)
  </code></pre>
  
  <p>And here is my ViewModel:</p>
  
  <pre><code>import Foundation
  import RxSwift
  import RxCocoa
  
  class LoginViewModel {
  
      let email = Variable&lt;String?&gt;("")
      let password = Variable&lt;String?&gt;("")
  
      var buttonEnabled: Observable&lt;Bool&gt;
  
      init() {
  
          var processedEmail: Observable&lt;String&gt;!
          var processedPassword: Observable&lt;String&gt;!
  
          processedEmail = email.asObservable().map(String.toLower as! (String?) -&gt; String).map(String.trimWhiteSpace as! (String?) -&gt; String)
          processedPassword = password.asObservable().map(String.toLower as! (String?) -&gt; String).map(String.trimWhiteSpace as! (String?) -&gt; String)
  
          let emailValid = processedEmail.asObservable().map(String.isNotEmpty)
          let passwordValid = processedPassword.asObservable().map(String.isNotEmpty)
  
          buttonEnabled = Observable.combineLatest(emailValid, passwordValid) {
              return $0 &amp;&amp; $1
          }
  
      }
  
      func didTapLoginButton() {
          print("hello \(email.value)")
      }
  }
  </code></pre>
  
  <p>For some reason the <code>init</code> method of my <code>viewmodel</code> never gets finished.
  Can someone help me? </p>