如何在Swift 3.0中将tableview单元格分隔符设置为100%宽度?

时间:2017-03-28 16:54:48

标签: ios xcode uitableview ipad swift3

我正在开发我的第一个应用程序,除了我在iPad上发现了一个显示问题,其中一个单元格的分隔符的宽度有限(见截图)

iPad上的屏幕截图

Screen Shot

我已经尝试了一些关于如何将边距设置为0的所有内容, 包括:

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

    let myCell = tableView.dequeueReusableCell(withIdentifier: "cellId", for: indexPath) as! MyCell

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

    return myCell
}

我没有使用故事板,而是以编程方式进行,

任何想法都会受到赞赏,

由于

1 个答案:

答案 0 :(得分:0)

我相信它是由FreeLibrary引起的。您可以通过设置Readable Content Guide

来停用它
相关问题