UITableViewCell is 1px shorter in didSelectRowAtIndexPath than cellForRowAtIndexPath
- by Calvin L
I have a UITableViewCell that I create in tableView:cellForRowAtIndexPath:. In that method I call:
UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
NSLog(@"Cell height: %f", cell.contentView.frame.size.height);
This gives me a return value of 44.000000.
Then in my tableView:didSelectRowAtIndexPath: method, I call:
UITableViewCell *cell = [tableView cellForRowAtIndexPath: indexPath];
NSLog(@"Cell height: %f", cell.contentView.frame.size.height);
And this gives me a return value of 43.000000. Aren't they the same cell? What gives?