当我在UITableView中获取单元格时出现问题。它导致我的app和show log崩溃:
警告:无法加载任何Objective-C类信息。这将 显着降低了可用类型信息的质量。
这是我的代码:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath];
CGSize labelSize = [cell.timeLabel.text sizeWithAttributes:@{NSFontAttributeName:cell.timeLabel.font}];
CGFloat timeLabelHeight = labelSize.height;
它一直在线上崩溃和崩溃
CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath];
你可以帮我解决一下吗?感谢。
答案 0 :(得分:-2)
你应该改变你输入的代码:
CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath];
如下:
CustomCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath]