I have created a custom
I think you were on the right track, but according to the class definition for
The default is nil for cells in plain-style tables (UITableViewStylePlain) and non-nil for section-group tables UITableViewStyleGrouped).
Therefore, if you're using a plain-style table, then you'll need to alloc-init a new
UIView having your desired background colour and then assign it to
Alternatively, you could use:
cell.selectionStyle = UITableViewCellSelectionStyleGray;
if all you wanted was a gray background when the cell is selected. Hope this helps.