快速删除每个表格单元格中的边框 [英] Remove border in each table cell in swift
本文介绍了快速删除每个表格单元格中的边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想删除每个Question表行的边框底线.另一件事是,我想删除每行中的左侧填充空间. 如何在迅速的iOS 9.0中实现它.
I would like to remove border bottom line of each Question table rows. Another thing is that I would like to remove the left padding space in each row. How to implement it in swift iOS 9.0 .
推荐答案
您可以通过在viewdidLoad中的下面的行中编写此代码来删除底部边框,
You can remove bottom border by writing this below line in viewdidLoad,
self.tblMyTable.separatorStyle = UITableViewCellSeparatorStyle.None
然后通过在cellForRow中编写此代码来删除左填充,
And Remove left padding by writing this in cellForRow,
cell.separatorInset = UIEdgeInsetsZero
cell.layoutMargins = UIEdgeInsetsZero
Swift 3.0更新:
Update for Swift 3.0:
cell?.separatorInset = UIEdgeInsets.zero
cell?.layoutMargins = UIEdgeInsets.zero
这篇关于快速删除每个表格单元格中的边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文