如何在UITableView中设置表头的高度? [英] How to set the height of table header in UITableView?

查看:290
本文介绍了如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆