Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove the borders of a UITableView?

People also ask

How do you clear a Tableview cell?

So, to remove a cell from a table view you first remove it from your data source, then you call deleteRows(at:) on your table view, providing it with an array of index paths that should be zapped. You can create index paths yourself, you just need a section and row number.

Is it possible to add UITableView within a UITableViewCell?

yes it is possible, I added the UITableVIew within the UITableView cell .. :) no need to add tableview cell in xib file - just subclass the UITableviewCell and use the code below, a cell will be created programatically.


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

swift 4 use

myTableView.separatorStyle = UITableViewCellSeparatorStyle.none