系统默认样式:
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
}
}
//