title: UITextfield : Text jumps up and down while typing
body: <p>I am having problem with the textfield input. In the 'CommentviewController' I have a scrollable tableview to display the previous comments, and at the bottom is a UItextField for the user to enter the comment and post it. The problem is: when I tried to type in the textfield and the keyboard is toggled, the text jumps up and down while I 'm typing. For example, the first char I typed is above the keyboard, and the second is below and behind the keyboard. Anybody has any idea about the cause? The test device is a 64 GB itouch5, and the code is written in objective C, and I am using the Xcode 6.3.2.</p>
  
  <pre><code>    &lt;i&gt;`- (void)keyboardWasShown:(NSNotification*)aNotification {
   NSDictionary* info = [aNotification userInfo]; 
  CGSize kbSize = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size; 
  theKBSize = kbSize; 
  UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbSize.height - 10, 0.0); 
  self.tvComment.contentInset = contentInsets; self.tvComment.scrollIndicatorInsets = contentInsets; 
  CGRect uvFrame = _uvComment.frame; 
  uvFrame.origin.y = self.view.frame.size.height - kbSize.height - _uvComment.frame.size.height; _uvComment.frame = uvFrame; } `&lt;/i&gt;
  
      &lt;i&gt; `- (void)keyboardWillBeHidden:(NSNotification*)aNotification { 
  UIEdgeInsets contentInsets = UIEdgeInsetsZero; 
  _tvComment.contentInset = contentInsets;
   _tvComment.scrollIndicatorInsets = contentInsets; 
  }`&lt;/i&gt;
  
      &lt;i&gt;`- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { 
  if(string==nil || [string length]&lt;1) { 
  [self.btnSend setEnabled: NO];
   }else {
   [self.btnSend setEnabled: YES]; 
  }
   return YES; 
  }`&lt;/i&gt; 
  </code></pre>