title: UITextField text jumps
body: <p>I have <code>ViewController</code> with 2 <code>UITextField</code> elements: Login and Password. I set delegate for these fields, which includes code below:</p>
  
  <pre><code>func textFieldShouldReturn(textField: UITextField) -&gt; Bool {
      if textField === self.loginField {
          self.loginField.resignFirstResponder()
          self.passwordField.becomeFirstResponder()
          return false
      }
  
      return true
  }
  </code></pre>
  
  <p>This logic should switch user from login text field to password when he presses Next button on keyboard. But I stuck with glitch: after</p>
  
  <pre><code>self.passwordField.becomeFirstResponder()
  </code></pre>
  
  <p>text in login field jumps to the top left corner and back. And what's more strange: this glitch reproduces only first time, then you need recreate <code>ViewController</code> to observe this behavior</p>
  
  <p>Here is video of the glitch <a href="http://tinypic.com/player.php?v=6nsemw%3E&amp;s=8#.VgVb3cuqpHx" rel="noreferrer">http://tinypic.com/player.php?v=6nsemw%3E&amp;s=8#.VgVb3cuqpHx</a></p>
  
  <h1>I ended up with this:</h1>
  
  <pre><code>func textFieldShouldReturn(textField: UITextField) -&gt; Bool {
      if textField === self.loginField {
          self.loginField.resignFirstResponder()
          // Shitty workaround. Hi, Apple!
          self.loginField.setNeedsLayout()
          self.loginField.layoutIfNeeded()
  
          self.passwordField.becomeFirstResponder()
          return false
      }
  
      return true
  }
  </code></pre>