title: Keyboard appearing briefly when popping viewcontroller iOS
body: <p>I'm experimenting an issue with the numeric pad when popping the current UIViewController from the UINavigationController. </p>
  
  <p>In my current UIViewController. I have a few UITextField and a "Save" button in the UINavigationBar. The expected behavior is as follows: </p>
  
  <p>When the user taps "Save", the keyboard must hide and a network operation is performed. In its callback, an UIAlertView is shown. When user dismisses this UIAlertView, a notification raises and the current UIViewController performs</p>
  
  <pre><code>[self.navigationController popViewControllerAnimated:YES];
  </code></pre>
  
  <p>The thing is, if "Save" is pressed with the keyboard still showing, after performing the popViewControllerAnimated, the keyboard appears briefly and from left to right (as if it was visible in the previous UIViewController). </p>
  
  <p>I've tried</p>
  
  <pre><code>[myTextField resignFirstResponder]
  </code></pre>
  
  <p>when user taps "Save", when user dismisses the UIAlertView, and even in the </p>
  
  <pre><code>viewWillDisappear 
  </code></pre>
  
  <p>method. Some other answers suggest using</p>
  
  <pre><code>[self.view endEditing:YES];
  </code></pre>
  
  <p>but it doesn't work either.</p>
  
  <p>If I could use the regular keyboard it would be trivial to override </p>
  
  <pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)textField
  {
      [textField resignFirstResponder];
  
      return YES;
  }
  </code></pre>
  
  <p>to hide it when user taps "Return", "Done", etc. But being the numeric pad doesn't allow you to show that "finish" button. </p>
  
  <p>I'd appreciate any help, thank you all for your time</p>