I have a tabular view with several prototype cells that I created in a storyboard, but I am stuck with a height problem because my first cell seems to be different from the second, etc. I have different identifiers for each cell, and because I designed them in a storyboard, I know that they are tall. I have this in my code, but it does not work, does anyone know how to fix it?
-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[UITableViewCell alloc]init]; switch (indexPath.section) { case 1: cell = [tableView dequeueReusableCellWithIdentifier:@"cell1"]; return 743.0f; break; case 2: cell = [tableView dequeueReusableCellWithIdentifier:@"cell2"]; return 300.0f; }
}
Thank you for your time.
source share