TableView Background image going over cell textLabel
Posted
by
Alex Trott
on Stack Overflow
See other posts from Stack Overflow
or by Alex Trott
Published on 2012-03-18T17:54:28Z
Indexed on
2012/03/18
17:56 UTC
Read the original article
Hit count: 138
Currently my tableview looks like this: as you can see, cell.textLabel and cell.detailTextLable both load this background, and i can't work out how to get them to stop loading the background, and for it only to be the backing on the cell.
Here's my current code to change the cell:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
[cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"tableCell.png"]]];
}
How can i get round this problem? Thanks in advance.
© Stack Overflow or respective owner