【问题标题】:Is it possible to add blank space to the end of a tableview [duplicate]是否可以在表格视图的末尾添加空格 [重复]
【发布时间】:2015-01-31 03:18:44
【问题描述】:

我正在尝试制作一个末尾有空格的表格视图,以便用户可以向上滚动更多并显示最后一个单元格更多焦点。这可能吗?

【问题讨论】:

  • 你的意思是像页脚视图?
  • 使用页脚或空单元格。
  • 我想,你要的是this

标签: ios objective-c


【解决方案1】:

答案是肯定的:tableFooterView,但你永远不需要这样做。

这里是如何使用tableFooterView的示例:

CGRect frame = CGRectMake(0, 0, 320, 40);
UIView *view = [[UIView alloc] initWithFrame:frame];
// configure view as needed
self.tableView.tableFooterView = view;

您应该查看的是contentInset

self.tableView.contentInset = UIEdgeInsetsMake(0.0, 0.0, 40.0, 0.0)];

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 2011-01-27
    • 2012-08-06
    • 2012-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-15
    • 2011-09-08
    相关资源
    最近更新 更多