You can hide the standard UITableView separator line using any of the code snippets below. The easiest way to add a custom separator is to add a simple UIView from 1px height:
UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)]; separatorLineView.backgroundColor = [UIColor clearColor];
OR
self.tblView=[[UITableView alloc] initWithFrame:CGRectMake(0,0,320,370) style:UITableViewStylePlain]; self.tblView.delegate=self; self.tblView.dataSource=self; [self.view addSubview:self.tblView]; UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 10)]; v.backgroundColor = [UIColor clearColor]; [self.tblView setTableHeaderView:v]; [self.tblView setTableFooterView:v]; [v release];
OR
- (float)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
OR
And also check nickfalk answer , it is very short and useful. And you should also try this single line,
self.tableView.tableFooterView = [[UIView alloc] init];
Not sure, but it works in all versions of iOS that I checked, with iOS 5 and later, up to iOS 7.
iPatel Jan 22 '13 at 14:25 2013-01-22 14:25
source share