【发布时间】:2017-08-21 21:04:59
【问题描述】:
我正在开发我的第一个应用程序,并且一切正常,除了我在 iPad 上发现了一个显示问题,其中单元格的分隔符宽度有限(见屏幕截图)
iPad 上的屏幕截图
我已经尝试了所有我能找到的关于如何将边距设置为 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
}
我没有使用情节提要,而是以编程方式进行,
任何想法都将不胜感激,
谢谢
【问题讨论】:
标签: ios xcode uitableview ipad swift3