Question: I have a UITableView that is set to not enable scrolling, and it exists in a UIScrollView. I'm doing it this way as the design specs call for something that looks like a table view, (actually there are two of them side by side), and it would be much easier to implement tableviews rather than adding a whole bunch of buttons, (grouped table views).

Question is, I need to know how big to make the container view for the scrollview, so it scrolls the whole height of the table views. Once loaded, is there any way to find the height of a tableview? There is no contentView property like a scroll view, frame seems to be static, etc...

Any thoughts?

Answer: 
Use 

```
CGRect lastRowRect= [tableView rectForRowAtIndexPath:index_path_for_your_last_row];
CGFloat contentHeight = lastRowRect.origin.y + lastRowRect.size.height;

```

You can then use the contentHeight variable to set the contentSize for the scrollView.
`UITableView` is a subclass of `UIScrollView`, so it has a `contentSize` property that you should be able to use no problem:

```
CGFloat tableViewContentHeight = tableView.contentSize.height;
scrollView.contentSize = CGSizeMake(scrollView.contentSize.width, tableViewContentHeight);

```

However, as [several](https://stackoverflow.com/q/17634617/1108362) [other](https://stackoverflow.com/q/9958328/1108362) SO questions have pointed out, when you make an update to a table view (like inserting a row), its `contentSize` doesn't appear to be updated immediately like it is for most other animated resizing in UIKit. In this case, you may need to resort to something like Michael Manner's answer. (Although I think it makes better sense implemented as a category on `UITableView`)