IOS tableview 消除 分割线短 15 像素 ios8方法 swift版
2015-07-12 23:02
417 查看
系统默认样式:
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 } } //
相关文章推荐
- Swift 学习之路(二)
- Swift 学习之路(一)
- Swift和OC混合编程
- swift基础知识
- 使用Swift读取Cookie内容
- Swift之数组使用
- Swift基础语法介绍
- 从C#到Swift,Swift学习笔记
- Swift中的!和?
- 属性观察_Swift
- Swift结构体和类
- swift 拼图小游戏
- iSwifting社区【www.iSwifting.com】招聘版主
- SWIFT中切換UIContainerView內的Controller
- swift错误: Type "xxx" does not confirm to protocol "BooleanType"
- SWIFT中正则表达式验证邮箱
- Swift语言 OS X程序点击dock图标重新弹出窗口方法
- Swift之使用UIAlertController实现UIActionsheet
- Swift开发--Storyboard的使用教程
- swift 动态设置UILabel的高度