I have a UITableViewCell (really a subclass) defined in a NIB. In the NIB I\'ve set the frame height to 183, I also set the \"Row Height\" to 183 and ticked off custom.
You can use this example code to get cell height from NIB
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [[[[NSBundle mainBundle] loadNibNamed:@"ELConvCurListViewCell" owner:self options:nil] objectAtIndex:0] bounds].size.height;
}
Update: You can get and assign height of NIB once time in the viewDidLoad
to the cellHeight
variable and in the heightForRowAtIndexPath
use return cellHeight