Search code examples
iphoneiosobjective-cuitableviewseparator

How to programmatically draw a etched line to use as separators in plain tableview


The UITableViewCellSeparatorStyleSingleLineEtched is only available in grouped table view. I want to produce the same effect on a plain table view, so I am thinking of drawing it programmatically. Is it feasible? If yes, how to do I do that?


Solution

  • Take a screenshot and zoom in. It looks like two parallel horizontal lines, one white and one grey. That will be simple enough to draw yourself, probably during a custom drawRect in your cell subclass.