UITableView - remove separator for “inactive” rows

前端 未结 2 1260
离开以前
离开以前 2021-01-23 06:15

I have screen similar to: \"enter

I want to remove separator below last \"active\" cell in

2条回答
  •  失恋的感觉
    2021-01-23 06:37

    This is a default behaviour in a UITableView, it fills the screen with empty rows.

    What you can do is set an empty footer to your table:

    - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
    {        
        return [[UIView alloc] init];
    }
    

    Or:

    [self.myTableView setTableFooterView:[[UIView alloc] init]];
    

提交回复
热议问题