title: resignFirstResponder not hiding keyboard on textFieldShouldReturn
body: <p>I have a view with a UITextField which should hide the keyboard when return is pressed.</p>
  
  <p>My function is this:</p>
  
  <pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)textField {
   if ( textField == userPassword ) {
    [textField resignFirstResponder];
   }
   return YES;
  }
  </code></pre>
  
  <p>Normally the keyboard should be hidden but it stays on the screen. resignFirstResponder is correctly called. What am I missing?</p>