我的 UITableView 上的这一行是什么?

发布于 2024-11-18 23:49:22 字数 610 浏览 2 评论 0原文

我有一个分组表视图。我以前制作过数十个表视图,但我不确定这一行是什么: 在此处输入图像描述

谁能告诉我那是什么以及如何删除它?

更新:

我将问题范围缩小到 heightForRowAtIndexPath 委托方法。看看下面的内容。请注意,我需要一些行更高:

-(CGFloat)tableView:(UITableView *)tableViewLocal heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if(indexPath.section == 0 && (indexPath.row == 3 || indexPath.row == 4 || indexPath.row == 5))  {
        return tableViewLocal.rowHeight * 1.3; //If I remove the multiplier, it doesn't produce the line.
    }
    else
        return tableViewLocal.rowHeight;
}

I have a grouped table view. I've made tens of table views before, but I'm not sure what this line is:
enter image description here

Can anyone tell me what that is and how to remove it?

UPDATE:

I narrowed down the problem to the heightForRowAtIndexPath delegate method. Take a look at that below. Note that I need some of the rows to be taller:

-(CGFloat)tableView:(UITableView *)tableViewLocal heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if(indexPath.section == 0 && (indexPath.row == 3 || indexPath.row == 4 || indexPath.row == 5))  {
        return tableViewLocal.rowHeight * 1.3; //If I remove the multiplier, it doesn't produce the line.
    }
    else
        return tableViewLocal.rowHeight;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小草泠泠 2024-11-25 23:49:22

看起来像背景。尝试在代码中设置 tableView

self.tableView.backgroundColor = [UIColor clearColor];

希望这会有所帮助。

It looks like the background. Try setting your tableView in code to

self.tableView.backgroundColor = [UIColor clearColor];

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文