如何在 UITableView 中设置表格标题的高度? [英] How to set the height of table header in UITableView?
本文介绍了如何在 UITableView 中设置表格标题的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经阅读了有关 UITableView 类和委托引用的 Apple 文档,但找不到明确设置表格标题高度的方法.
I have gone through Apple docs about UITableView class and delegate reference but couldn't find the way to set the table header height explicitly.
我使用以下委托设置表格单元格高度:
I set Table cell height using following delegate:
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
并使用以下委托设置节页眉/页脚高度.
and set section header/footer height using following delegates.
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
谁能帮我设置表格页眉/页脚的高度?
Could anyone please help me to set the table header/footer height?
谢谢.
推荐答案
只需设置tableHeaderView的frame属性即可.
Just set the frame property of the tableHeaderView.
这篇关于如何在 UITableView 中设置表格标题的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文