You can find the number of rows in that section by calling the tableView:numberOfRowsInSection:
method from the UITableViewDataSourceDelegate
protocol. You can get the height for each row in the section with the tableView:heightForRowAtIndexPath:
method from the UITableViewDelegate
protocol. Add up the height for all the rows and you have the distance you want.
Your code would look something like this, assuming you have a reference to the tableview and the section.
float totalHeight = 0;
for (int i = 0; i < [tableViewDataSourceDelegate
tableView:tableView
numberOfRowsInSection:section]; i ++) {
totalHeight += [tableViewDelegate
tableView:tableView
heightForRowAtIndexPath:[NSIndexPath
indexPathForRow:i
inSection:section]];
}
Haven't had a chance to test this code, but it Should Work[tm].
Edit
This will only work if the header is at the top.