title: UITextField and Keyboard Notifications - strange order
body: <p>So I've set up a notification for the keyboard appearance event. Now let us consider a UITextView and a UITextField. </p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(keyboardWillShow:)
                                               name:UIKeyboardWillShowNotification
                                             object:nil];
  </code></pre>
  
  <p>The selector is:</p>
  
  <pre><code>- (void)keyboardWillShow:(NSNotification *)notification {
  
          keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
  }
  </code></pre>
  
  <p>In case of a UITextView, the delegate method <code>- (void)textViewDidBeginEditing:(UITextView *)textView</code> is fired <strong>AFTER</strong> the <code>keyboardWillShow:</code> method. So keyboardSize has the keyboard's actual size and I'm able to use that inside the textview delegate method.</p>
  
  <p>However in case of a UITextField, the corresponding delegate method <code>- (void)textFieldDidBeginEditing:(UITextField *)textField</code> is fired <strong>BEFORE</strong> the <code>keyboardWillShow:</code> method.</p>
  
  <p>Why is this so? How do I get the keyboard's <code>CGSize</code> in the textfield's case as now it just returns zero because the textfield delegate is called first and not the keyboard selector. </p>