【发布时间】:2019-05-29 12:08:04
【问题描述】:
我已将UITableViewController 与静态单元格一起使用,在这两个部分中我有动态 xib 单元格。它在所有 iOS 手机设备中都可以正常工作,但在 iPad 中它会崩溃。
[UITableViewCell otherFeeLblName]: 无法识别的选择器发送到 实例 0x7fc45009a000
if (indexPath.section == 2 && defaultsOtherFees.count>0 && (flatRateStatus !=YES)) { OtherFeeCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OtherFeeCell"];
NSDictionary *otherFeeDict = defaultsOtherFees[indexPath.row];
if (otherFeeDict.count>indexPath.row) {
NSString *otherPriceDescription = [otherFeeDict objectForKey:@"otherPriceDescription"];
cell.otherFeeLblName.text = otherPriceDescription; //crashes on ipad
cell.delegate = self;
}
return cell;
}
if (indexPath.section == 4) {
RemarkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RemarkCell"];
NSDictionary *dict = remarksArray[indexPath.row];
return cell;
}else
{
return [super tableView:tableView cellForRowAtIndexPath:indexPath];
}
【问题讨论】:
-
请输入你所做的一些代码。
-
@ChitraKhatri 这是用 cellForRow 编写的代码
标签: ios objective-c uitableview