zoukankan      html  css  js  c++  java
  • IOS tableview 消除 分割线短 15 像素 ios8方法 swift版

    系统默认样式:

    q 

    ios8 去除默认分割线边距的代码:

        //去除表格左侧分割线代码开始
        func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
            //ios8
            if cell.respondsToSelector("setSeparatorInset:"){
                cell.separatorInset = UIEdgeInsetsZero
                tableView.separatorInset = UIEdgeInsetsZero
                //cell.separatorInset.left = 5
            }
            
            if cell.respondsToSelector("setLayoutMargins:"){
                cell.layoutMargins = UIEdgeInsetsZero
                tableView.layoutMargins = UIEdgeInsetsZero
                //cell.separatorInset.left = 5
            }
        }
        //
    本文欢迎转载,转载请注明出处,如果涉及侵权,请企鹅:723887809。
  • 相关阅读:
    HDU 2795
    HDU 1394
    HDU 1754
    HDU 1166
    SDOI 2006
    HDU 1423
    HDU 1561
    centos7.4 搭建zabbix-server 3.4.5
    vim 简单笔记
    jdk环境并配置环境变量
  • 原文地址:https://www.cnblogs.com/toxufe/p/4641751.html
Copyright © 2011-2022 走看看