首页 > 移动平台 > 详细

IOS tableview 消除 分割线短 15 像素 ios8方法 swift版

时间:2015-07-13 00:45:21      阅读:1221      评论:0      收藏:0      [点我收藏+]

系统默认样式:

技术分享 

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
        }
    }
    //

IOS tableview 消除 分割线短 15 像素 ios8方法 swift版

原文:http://www.cnblogs.com/toxufe/p/4641751.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!