I have a table view that has alternate colors as background color for cells. In addition to that i have added a disclosure indicator accessory. However, the problem is that the cell background color doesnt seem to apply to the area 'behind' the disclosure indicator. The cell background color seems to truncate before the disclosure indicator appears at the right end of the table cell.
A:
I have the same problem and it is behind the built-in accessories... Haven't found any way to set it's background color yet..
Daniel K
2009-09-08 20:09:12
A:
I had a similar problem. This seems to happen because each row in a table is divided into several parts. So merely changing cell.BackgroundColor isn't going to change the entire rows color.
Try something similar to this.. It worked for me:
UITableViewCell *bgView = [[UITableViewCell alloc] initWithFrame:CGRectZero];
bgView.backgroundColor=indexPath.row % 2? [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1]: [UIColor whiteColor];
cell.backgroundView=bgView;
dpigera
2010-09-08 08:23:37