Swift删除TableCell边距

时间:2017-12-23 09:38:52

标签: swift uitableview tablecell

虽然经常会问类似的问题,但我仍然无法找到确切的解决方案。我现在要做的是删除TableCell中的左右边框/边距,如下所示。

Existing problematic TableCell enter image description here

ideal TableCell enter image description here

我尝试在func tableview中添加以下代码(... cellForRowAt ...)但它不起作用,

    cell.separatorInset = UIEdgeInsets.zero
    cell.layoutMargins = UIEdgeInsets.zero
    cell.preservesSuperviewLayoutMargins = false

感谢您的帮助!

0 个答案:

没有答案
相关问题