标题和第一个单元格之间的分离——在普通的 UITableView 中 [英] Separation between Header and first cell -- In plain UITableView

查看:11
本文介绍了标题和第一个单元格之间的分离——在普通的 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天全站免登陆