iOS swift 删除 UITableView 单元格分隔符空间 [英] iOS swift remove UITableView Cell separator space

查看:39
本文介绍了iOS swift 删除 UITableView 单元格分隔符空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除 tableView 分隔符,我通过将分隔符样式设置为无来做到这一点,这将删除分隔符但在单元格之间留下空间.

i am trying to remove the tableView separator, i do that by setting the separator style to none, this removes the separator but leaves the space between the cells.

我的问题是如何删除单元格之间的空间?

My question is how do i remove that space between the cells?

任何帮助将不胜感激.

推荐答案

awakeFromNib 函数中将 UITableViewCell 选项设置为 UIEdgeInsetsZero 应该可以工作

In awakeFromNib function setting UITableViewCell options to UIEdgeInsetsZero should work

  self.layoutMargins = UIEdgeInsetsZero
  self.separatorInset = UIEdgeInsetsZero

这篇关于iOS swift 删除 UITableView 单元格分隔符空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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