swift cell 分割线 显示不全 自由控制长度
2017-09-14 17:15
337 查看
1.看了下官方文档
2.文档简介
See also
这个也可用 OC的
实力属性
类属性
static var zero: UIEdgeInsets
3.具体代码
2.文档简介
See also
UIEdgeInsetsMake(_:_:_:_:)and
UIEdgeInsetsZero.
这个也可用 OC的
实力属性
var bottom: CGFloat
var left: CGFloat
var right: CGFloat
var top: CGFloat
类属性
static var zero: UIEdgeInsets
3.具体代码
//下划线长度控制 func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { if cell.responds(to: #selector(setter: UIView.layoutMargins)) { //cell.layoutMargins = UIEdgeInsetsMake(0, 50, 0, 0) cell.layoutMargins = UIEdgeInsets(top: 0, left: 50, bottom: 0, right: 0) cell.layoutMargins = UIEdgeInsets.zero } if cell.responds(to: #selector(setter: UITableViewCell.separatorInset)) { cell.separatorInset = UIEdgeInsetsMake(0, 50, 0, 0) //cell.separatorInset = UIEdgeInsets(top: 0, left: 50, bottom: 0, right: 0) cell.separatorInset = UIEdgeInsets.zero } }
相关文章推荐
- swift3.0 tableviewcell分割线显示不全解决方案
- [绍棠_Swift] Swift3.0中tableviewcell分割线显示不全解决方案
- Swift tableview 单元格分割线显示不全的解决方法
- iOS tableView去掉显示多余的cell分割线
- css控制标题长度超出部分显示省略号
- css控制字体长度(用省略号显示)
- 基于Swift的iOS应用程序开发:使用表格显示并控制数据(四):使用UIRefreshController实现下拉刷新
- swift 如何控制view的显示与隐藏
- iOS tableViewCell plane格式下,接近section边缘不显示分割线却被复用解决办法
- Swift基础之侧滑Cell显示操作按钮
- iOS cell分割线从头显示
- css控制一行文字超过固定长度显示省略号
- span 截取样式代码,控制文字显示长度
- 控制texterea长度,及显示剩余字数
- Swift - UITableView里的cell底部分割线左侧靠边
- css控制标题长度超出部分显示省略号
- IOS8 UITableViewCell线填充方法 不显示多余cell分割线
- angularjs如何在ng-repeat过程中控制字符串长度超过指定长度后面内容以省略号显示
- dedecms 搜索结果页中文章标题长度显示不全的解决办法
- repeater模板列中控制字符显示的长度