title: Keyboard pops up after UIAlertView is dismissed on iOS 8.3 for iPad
body: <p>With the latest iOS 8.3 release, our app starts to have a weird behavior.</p>
  
  <p>After finishing textfield editing, the user can click the close button which brings up an <code>UIAlertView</code>. When the user clicks <em>discard</em> in the alertview, alertview and current view are dismissed. But somehow the keyboard shows up after the view is gone which is quite annoying to users.</p>
  
  <p>After some debugging, it seems that the keyboard is shown for the last textfield that the user has accessed before closing the view. I tried various ways to <code>endEditing</code> for the current view in many places (before showing <code>UIAlertView</code>, after clicking a button in the <code>UIAlertView</code>; I even set the focus to another UI element of the view). It didn't solve the problem. </p>
  
  <p>But for this particular issue, I'm not sure if it's a common issue or something we need to fix. Everything works perfectly before iOS 8.3.</p>
  
  <p>We understand that <code>UIAlertView</code> is deprecated for iOS 8. We're starting to migrate to <code>UIAlertController</code>. But if there's any workaround, we'd love to hear.</p>
  
  <p>Here's some code snippet.</p>
  
  <pre><code>- (IBAction)closeTapped:(UIButton *)sender
  {
      // try to resign first responder
      // [self.tfName resignFirstResponder];
      // [self.tfPosition resignFirstResponder];
      [self.view endEditing:YES];
  
      if(self.orderDetails.isOpen &amp;&amp; self.orderItemChanged)
      {
          UIAlertView* saveAlert = [[UIAlertView alloc] initWithTitle:@"Unsaved Changes"
                                                              message:@"Your changes have not been saved. Discard changes?"
                                                             delegate:self
                                                    cancelButtonTitle:@"Cancel"
                                                    otherButtonTitles:@"Save", @"Discard", nil];
          [saveAlert show];
      }
      else
      {
          [self close];
      }
  }
  
  - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      switch(buttonIndex)
      {
          case 1: // Save
          {
              [self save];
              break;
          }
          case 2: // Discard
          {
              [self close];
              break;
          }
      }
  }
  
  - (void)close
  {   
      [self.delegate dismissEditOrderItemVC];
  }
  </code></pre>