我正在使用 UITableView 显示多行数据:textLabel.text 用于名称,imageView 用于显示状态(在线/离线),detailTextLabel 用于附加信息。
前任。在 cellForRowAtIndexPath 中
cell.imageView.image = [UIImage imageNamed:@"checking.png"];
cell.textLabel.text = @"NAME";
cell.detailTextLabel.text = @"Checking...";
如何从另一个函数更新 imageView.image 和 detailTextLabel.text。有 UITableView 方法吗?我猜我需要使用 IndexPath 行来定位单元格。也许为每个 imageView 和 detailTextLabel 分配标签?
谢谢。