美文网首页
tableViewHeaderInSection

tableViewHeaderInSection

作者: 清风明月伴我行 | 来源:发表于2021-02-22 19:42 被阅读0次
1)  - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {}
要求委托提供一个视图对象以显示在表视图的指定部分的标题中。

2)  - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {}
Asks the data source for the title of the header of the specified section of the table view.

3)  - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {}
向委托人询问要用于特定节的标题的高度。
###使用此方法指定自定义section header视图的高度。

实现1、2其一,则有段标题。

1、2均实现,1优先。

3必须实现, 必须配合实现1或者2,此方法指定的高度才有效果。(方法2可以返回nil,指定无section header但占位指定高度。)否则实现3高度也无效。section header有默认高度的。

相关文章

  • tableViewHeaderInSection

    实现1、2其一,则有段标题。 1、2均实现,1优先。 3必须实现, 必须配合实现1或者2,此方法指定的高度才有效果...

网友评论

      本文标题:tableViewHeaderInSection

      本文链接:https://www.haomeiwen.com/subject/lnmvoktx.html