0
votes

I'm using an UITableView Style Grouped Seperator NO

When the table view loads I See a small distance between the cells.

enter image description here

and when scrolled it goes away

enter image description here

Need to get rid of that line. what is that I'm missing.

2
are you using simulator? - Abdul Rehman
this is not the recommended fix, but you could set the background color of the table view or the separator to white - Retterdesdialogs
@AbdulRehmanWarraich I faced this issue in all devices - Simon Fernandes

2 Answers

0
votes

Use this, it will help you.

Write this in your viewDidLoad

 tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];

And write this method for UITableView

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

      if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
          [tableView setSeparatorInset:UIEdgeInsetsZero];
      }

      if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
          [tableView setLayoutMargins:UIEdgeInsetsZero];
      }

      if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
          [cell setLayoutMargins:UIEdgeInsetsZero];
      }
  }
0
votes

Thanks All,

Have solved this by setting Bottom Constraint of the view to -1, and unchecked Clip To Bounds for both UITableViewCell and its Content View.