If you're still having problems, try this without the need for a scrollView.
After playing around with DBD's example for awhile, I found that the frame and contentSize don't seem to be able to be set together like:
self.tableView.contentSize = CGSizeMake(320, scrollHeight);
self.tableView.frame = CGRectMake(self.tableView.frame.origin.x,44,self.tableView.contentSize.width,self.tableView.contentSize.height);
The attempt was to set a max height of the frame but keep the ability to scroll though all of the content if there were a large number of cells. This hack seems to work well and can be modified with more conditions if needed:
int cellCount = [YOURARRAY count];
CGFloat scrollHeight = cellCount*44+44;//for a cell with height of 44 and adding 44 if you have a toolbar at the bottom
self.tableView.contentSize = CGSizeMake(320, scrollHeight);//you can change the width and or let the .xib control the autoresizing
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad && cellCount < 14)
{
//here's were you can add more conditions if you're in landscape or portrait, but this handles 14 cells with a heightForHeaderInSection of 46 in landscape
self.tableView.frame = CGRectMake(self.tableView.frame.origin.x,44,self.tableView.contentSize.width,scrollHeight);
}
else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && cellCount < 7)
{
//same as above but it's for the iPhone in portrait
self.tableView.frame = CGRectMake(self.tableView.frame.origin.x,44,self.tableView.contentSize.width,scrollHeight);
}
This works for sure. You might need to adjust the autoresizingMask inside your .xib or in your code, but this hack is the only solution I found that takes care of all the different variables in my case.