Reputation: 33901
I have a custom Cell for my TableView, with an ImageView on it.
Why is the ImageView only visible when the cell is highlighted?
The cells are created thusly:
- (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;
}
Upvotes: 0
Views: 133
Reputation: 6239
Check out: Custom UITableViewCell (IB) only shows in selected state
The quick synopsis of it "Filling the standard UITableViewCell.textLabel.text seems to overwrite the PrototypeCells". So it would appear you have to create and add a different text label.
Upvotes: 2
Reputation: 7270
Maybe your UIImageView
is a subview of the highlighted background view, only visible when the cell is selected?
Upvotes: 0