How do I remove the borders of a UITableView?

Viewed 60681

I have subclassed the UITableView control, and the style is grouped, but I do not need the cell separators. I tried setting my table view's separatorStyle to none, but it doesn't work. Can any one help me out?

6 Answers

Use this

tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

swift 4 use

myTableView.separatorStyle = UITableViewCellSeparatorStyle.none

How about setSeparatorColor to your cell's background color?

Related