UITableView Separator line
How can I change the separator line that appears at the end of each cell in UITableView? I want to have an image that is a thin separator type line image.
Set the separatorStyle
of the tableview to UITableViewCellSeparatorStyleNone
. Add your separator image as subview to each cell and set the frame properly.
Try this
Objective C
[TableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
[TableView setSeparatorColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"[email protected]"]]];
Swift
tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine
tableView.separatorColor = UIColor(patternImage: UIImage(named: "YOUR_IMAGE_NAME")!)