我的TableView有一个自定义Cell,上面有一个ImageView。
为什么ImageView只在单元格突出显示时才可见?
如此创建细胞:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
Site *site = [self.dataController objectInListAtIndex:indexPath.row];
[[cell textLabel] setText:site.description];
return cell;
}
答案 0 :(得分:2)
退房:Custom UITableViewCell (IB) only shows in selected state
它的快速概要“填写标准的UITableViewCell.textLabel.text似乎覆盖了PrototypeCells”。因此,您似乎必须创建并添加不同的文本标签。
答案 1 :(得分:0)
也许您的UIImageView
是突出显示的背景视图的子视图,只有在选中此单元格后才会显示?