How do I remove the borders of a UITableView?
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?
In a grouped table view, setting separatorStyle
doesn't do anything. If you want to hide it, just do the following:
tableView.separatorColor = [UIColor clearColor];
Use this
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
To remove the border of a table view write this line:
self.myTableView.separatorColor = [UIColor clearColor];
If you want to remove both the border of a table view but the border between cells too, you have to write both lines:
self.myTableView.separatorColor = [UIColor clearColor];
self.myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
This did the trick for me:
[dayTableView setSeparatorColor:[UIColor whiteColor]]; //or your background color