int p = [indexPath indexAtPosition: [indexPath length] - 1];
[cell setText:[[array objectAtIndex: p] objectForKey: @"title"]];
我在这里找不到错误的原因。我正在做xml解析,只是想在tableview中显示内容,但程序没有运行,因为不推荐使用的错误弹出,我无法弄清楚原因。
答案 0 :(得分:2)
您需要访问单元格的textLabel
:
cell.textLabel.text = [[array objectAtIndex: p] objectForKey: @"title"];
text
上的旧UITableViewCell
属性很久以前就已被弃用。
答案 1 :(得分:1)
使用此代码
Cell.textLabel.text=[array objectAtIndex: p] objectForKey: @"title"]];
不会弃用。