头和第一个单元格之间的分隔 - 在纯UITableView [英] Separation between Header and first cell -- In plain UITableView

查看:155
本文介绍了头和第一个单元格之间的分隔 - 在纯UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有简单风格的表格,只有一个部分。我已经实现 viewForHeaderInSection:在节头中添加自定义视图。

I have a table with with Plain style and only one section. I have a implemented viewForHeaderInSection: to add a custom view in the section header.

我无法看到我的表部分标题视图和我的第一个
单元格之间的分隔线。 [见附图]

I am not able to see a separation line between my table section header view and my first cell. [See the attached image]

我做错了什么?

推荐答案

自定义页眉和页脚不包含其下方/上方的分隔符。您需要在自定义视图中自行实现分隔符(或切换到分组样式,即使使用自定义页眉/页脚也会显示该组上方和下方的大纲)。

Custom headers and footers do not contain separators below/above them. You'll need to implement the separator yourself in the custom view (or switch to grouped style, which will show the outline of the group above and below it even with a custom header/footer).

这篇关于头和第一个单元格之间的分隔 - 在纯UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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