Hi all,
I have a UITableView with custom cells in it. I'd like to add a little red bar between the cells to have the cells be more distinct.
Is there an easy way to do this?
Thanks!
Hi all,
I have a UITableView with custom cells in it. I'd like to add a little red bar between the cells to have the cells be more distinct.
Is there an easy way to do this?
Thanks!
Use the separatorStyle
and separatorColor
properties of the UITableView
. For example:
- (void) viewDidLoad
{
self.tableView.separatorColor = [UIColor redColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
}
That style is the default, there are some others, but depending on what OS you are targeting (the etched style is only available as of 3.2, for example).