I've gotten different perspectives on this from different sources, and I'd like to clear it up. When calling tableView:heightForRowAtIndexPath:
, a required method, can I dynamically resize cell heights depending on the data within them? Can this be done 'on the fly' or do I need to standardize five or six prototype cells and choose which cell to use based on its reuseIdentifier
.
If for example I called
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [tableView indexPathForSelectedRow]*20;
}
would this draw all necessary cells immediately, and then still be swapping out these same cells or would it redraw the cells once they leave the screen. Why would I need to have multiple prototype cells?