iOS learning-UITableView setting heightForFooterInSection is invalid and UITableViewHeaderFooterView at the bottom of tableview has a light gray background by default

1. The setting for heightForFooterInSection is invalid

You need to add self.tableView.sectionFooterHeight = 8 when initializing the tableview;//Set the height you want

2. UITableViewHeaderFooterView at the bottom of tableview has a light gray background by default

Here you can set a UIView in the proxy

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    UIView *view =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
    view.backgroundColor = [UIColor clearColor];
    return view;
}

Guess you like

Origin blog.csdn.net/qq_43441647/article/details/130525190