I have a table view that contain cells… some have images and some do not. I would like to size the cells that have images larger than those that don’t.
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 150;
}
With this code, how would I tell if indexPath has an image or not? Thanks for you help!
Use the same logic that you use in
tableView:cellForRowAtIndexPath:to obtain the model information that is backing theUITableViewCell.Now you have the info that populates the
UITableViewCellyou can query if you provided an image.