Delete the extra separator of UITableView with pain style

“Delete” the extra separator of UITableView with pain style

ios - Eliminate Extra separators below UITableView - in iphone sdk? - Stack Overflow

Solution 1

1
2
3
4
5
// "Delete" the extra separator of UITableView and the last one Separator in ecah Section
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {

return 0.01f;
}

height=0.01f

Solution 2

1
2
3
- (void)viewDidLoad {
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
}

CGRectZero

Table View Style

UITableViewStylePlain

A plain table view. Any section headers or footers are displayed as inline separators and float when the table view is scrolled.

UITableViewStyleGrouped

A table view whose sections present distinct groups of rows. The section headers and footers do not float.