带有标题区的iPhone UITableView [英] iPhone UITableView with a header area

查看:79
本文介绍了带有标题区的iPhone UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用所有默认 UITableView 创建的视图,但现在我需要在 UITableView上面添加一个标题区域是(所以 UITableView 将正常滚动,但屏幕的前100px左右会有静态标题内容)。我没有看到我可以在IB中调整 UITableView 的大小,我不知道该怎么做。

I have a view that was created with all of the default UITableView stuff, but now I need to add a header area above where the UITableView is (so the UITableView will scroll normally, but the top 100px of the screen or so will have static header content). I don't see where I can resize the UITableView in IB, and am not sure how to do this.

有谁知道?

推荐答案

为什么不使用UITableView提供的标题?如下所示:

Why don't you use the UITableView provided header?. As follow:

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

{
     return @"My Title";
}

此外,您可以通过拖动边框来调整IB中的表格视图。

Additionally you may resize your table view in IB by dragging the borders.

这篇关于带有标题区的iPhone UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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