0

Hello can anyone help me to know difference between following two methods.

First :

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100;
}

Second :

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100;
}

Thanks in advance.

Chirag Kothiya
  • 955
  • 5
  • 12
  • 28

1 Answers1

4

heightForRowAtIndexPath is the real height. Cell's height is 100.

estimatedHeightForRowAtIndexPath isn't the real height. The Cell estimates the height as 100. The actual height is then calculated based on the constraint

Sim.Li
  • 111
  • 7