UITableViewCell分隔符未显示 [英] UITableViewCell separator not showing up
问题描述
我在IB中制作了一个自定义UITableViewCell,但出于某种原因,尽管选择了分隔符的单行选项,但我的表上没有分隔线。
I made a custom UITableViewCell in IB, but for some reason, despite the single line option for separator being selected, there are no separator lines on my table.
这件事发生在你们之前吗?给出了什么?
Has this happened to any of you before? What gives?
谢谢!
推荐答案
IB中的UITableViewCell与覆盖 drawRect:
的UITableViewCell子类相关联?如果是这样,请确保您正在调用超级实现,因为这是在底部绘制线条的内容。如果您要覆盖 layoutSubviews
,请确保没有视图遮挡单元格的底部。
Is the UITableViewCell in IB associated with a UITableViewCell subclass that overrides drawRect:
? If so, make sure you are calling the super implementation, as that's what draws the line at the bottom. If you are overriding layoutSubviews
make sure no views are obscuring the bottom of the cell.
这篇关于UITableViewCell分隔符未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!