title: Unable to scroll to the bottom of UITableView
body: <p>I know there are many answers of the question in the forum but they didn't help me. Here is my problem. </p>
  
  <p>I have <code>UITableView</code> with <code>UISegmentedControl</code>. In the one segment there is less data than in the other one. After rotation or segment switch, I invoke <code>reloadData</code> to ensure that the entire data is displayed. That works. </p>
  
  <p>Now, the user clicks on a cell and goes to another view using the same <code>UISegmentedControl</code>. It is intended that the same control is used, I want that both views show the same perspective to the data. The problem appears when the user sees the perspective with less data on the first screen, goes to the second and changes the perspective to the data there. Then he goes back and is not able to scroll to the bottom of the table. If he rotates the screen or changes the segment, everything is fine again.</p>
  
  <p>I tried solving the problem by implementing <code>viewWillAppear:</code> and reducing/calculating there the height of the <code>tableView</code>. Unfortunately, it didn't worked. Invoking <code>reloadData</code> doesn't help neither. Actually, the <code>tableView</code> is already reloaded when switching the segment... But still, I am not able to see the last cells of the table.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here are the heights that I get from the tests (without resizing):</p>
  
  <p><code>NSLog(@"Before switch: %f, %f", self.tableView.frame.size.height, self.tableView.contentSize.height);</code> --> Before switch: 372.000000, 471.000000</p>
  
  <p><code>NSLog(@"After switch: %f, %f", self.tableView.frame.size.height, self.tableView.contentSize.height);</code> --> After switch: 372.000000, 585.000000</p>
  
  <p>The <code>tableView</code> remains the same, only the <code>contentSize</code> increases. I tried setting the value of the one to the value of the other, reducing the values etc. but I don't really know what should be done...</p>
  
  <p><strong>EDIT2:</strong></p>
  
  <p>All <code>contentSize</code> and <code>height</code> values seem to be fine. However, I realized that the problem is somehow related to the custom header view on the screen. When I remove it from the table view, it scrolls to the end. With the header view, however, it does not. I don't change anything from the header view, it is just a view with buttons on the top of the table. </p>