UITableView - remove separator for “inactive” rows

前端 未结 2 1261
离开以前
离开以前 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]];
    
    0 讨论(0)
  • 2021-01-23 06:50

    This is normal behavior for a plain style table view with just a few rows. A simple solution is to provide an empty table footer:

    self.tableView.tableFooterView = [[UIView alloc] init];
    
    0 讨论(0)
提交回复
热议问题