iOS 关于UITableView原生分割线separator的

2019-08-14  本文已影响0人  jsone

当未设置tableFooterView和实现组头组尾高度的代理方法:

- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return CGFLOAT_MIN;
}

- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return CGFLOAT_MIN;
}

则会用分割线铺满tableView剩余部分;
2)、当设置tableFooterView = [[UIView alloc] init]时,会显示最后一行cell的separator,当实现组头组尾高度的代理方法时,则不显示最后一行cell的separator。

上一篇 下一篇

猜你喜欢

热点阅读