Display Separator only for the Available CellForRow in UITableView

前端 未结 3 1562
渐次进展
渐次进展 2020-12-31 09:37

I am using UITableView with custom cell.
It is working fine but problem is when there is only one or two cell in UITableView.
It is giving the separator for the e

3条回答
  •  鱼传尺愫
    2020-12-31 10:00

    Another solution:

    UIView *v = [[UIView alloc] initWithFrame:CGRectZero];
    v.backgroundColor = [UIColor clearColor];
    [self.tableView setTableFooterView:v];
    

    This works too

    self.tableView.tableFooterView = [UIView new];
    

提交回复
热议问题