title: Behavior when inserting a row to a UITableView
body: <p>I am making a chat application. When the keyboard appears, my UITableView and toolbar (with textfield and button) move up using the <code>setFrame</code> method.</p>
  
  <p>The problem occurs when I am receiving a message from another user while I'm typing a message. When that happens (i.e. after an <code>insertRowsAtIndexPaths</code> to the UITableView), my UITableView and toolbar "reset" to their original positions.</p>
  
  <p>Is this normal behavior caused by the system? I can't find anything in my code that would do this. I want that the toolbar remains visible so I can still type my message.</p>
  
  <p>This is the code to add a <code>convoItem</code> (conversation item) to my array and UITableView:</p>
  
  <pre><code>- (void)insertConvoItem:(ConvoItem *)item
  {
      [_convoItems addObject:item];
  
      // Update the table view
      NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:([self.convoItems count] - 1) inSection:0];
      [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
  
      // Scroll to the bottom so we focus on the latest message
      NSUInteger numberOfRows = [self.tableView numberOfRowsInSection:0];
      if (numberOfRows) {
          [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(numberOfRows - 1) inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:YES];
      }
  }
  </code></pre>