好吧,我很确定这个方法一直执行到现在我的UITableViewController
. 我的方法中有打印语句,如下所示:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
//455(PERFECT MIN HEIGHT) 475 is perfect spacing. 15.5 is the scalar for when descriptionLabel expands lines
return 475;
NSLog(@"ISSSS ITTT ONNNN???");
if (currentDescriptionHeight == 16.0) {
NSLog(@"OHHH so it triggered 1111");
return 475;
}else if (currentDescriptionHeight == 31.5){
NSLog(@"OHHH so it triggered 2222");
return 490.5;
}else if (currentDescriptionHeight == 47){
NSLog(@"OHHH so it triggered 3333");
return 506;
}
//475 - 1 line description,
}
我已将方法标头复制到我的.h文件中,并已正确设置委托:
self.tableView.delegate = self;
self.tableView.dataSource = self;
在我的viewDidLoad:
方法中。为什么我heightForRowAtIndexPath
根本没有被叫到?