In my app, I use a UITableView
My problem is that I want to remove the last border of the last cell in UITableView
.
Please check the following image:
The best solution is add a footer view. The following code hide the last cell's line perfectly:
Objective-C
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 1)];
Swift 4.0
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 1))