【问题标题】:Remove tableview footer line删除 tableview 页脚行
【发布时间】:2014-09-30 17:35:10
【问题描述】:

我将图像背景设置为这样的表格视图:

[self.tableView setBackgroundColor:[UIColor clearColor]];
UIImageView *tableBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"myImage"]];
[tableBackgroundView setFrame: self.tableView.frame];
[self.tableView setBackgroundView:tableBackgroundView];

如果我向下移动滚动条,它总是在末尾显示一条灰线。我试过了

self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];

但它仍然无法正常工作。

【问题讨论】:

  • 您是否关闭了分隔符?将分隔符样式设置为UITableViewCellSeparatorStyleNone
  • @CrimsonChris 我更新了问题,我尝试了 UITableViewCellSeparatorStyleNone 但仍然无法正常工作。

标签: objective-c uitableview ios7 ios8


【解决方案1】:

请在 viewDidLoad 中尝试以下行:

[self.tableView setTableFooterView:[[UIView alloc]initWithFrame:CGRectZero]];

这将从 tableview 中删除额外的分隔符

希望它会起作用......

【讨论】:

  • 我就是这么做的。你也可以看到我的帖子。
猜你喜欢
  • 2013-12-20
  • 2016-12-25
  • 2014-04-12
  • 2012-06-19
  • 2012-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多