UITableViewCell分隔符未显示 [英] UITableViewCell separator not showing up

查看:97
本文介绍了UITableViewCell分隔符未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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屋!

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