uitableview去掉最后一行cell的底线
2016-07-11 14:49
399 查看
func tableView(tableView:
UITableView, heightForFooterInSection section:
Int) -> CGFloat {
//2是最后一行
if section ==
2{
return
10
}else{
return
0
}
}
func tableView(tableView:
UITableView, viewForFooterInSection section: Int) ->
UIView? {
let sectionHeader =
UIView(frame: CGRectMake(0,
0, view.frame.width,
10))
//这个颜色和tableview背景颜色一样
sectionHeader.backgroundColor =
UIColor(red: 0.97, green:
0.97, blue: 0.97, alpha:
1.0)
return sectionHeader
}
如果不行,就把Footer换成header,多添加一个selection,这个我试过,行
UITableView, heightForFooterInSection section:
Int) -> CGFloat {
//2是最后一行
if section ==
2{
return
10
}else{
return
0
}
}
func tableView(tableView:
UITableView, viewForFooterInSection section: Int) ->
UIView? {
let sectionHeader =
UIView(frame: CGRectMake(0,
0, view.frame.width,
10))
//这个颜色和tableview背景颜色一样
sectionHeader.backgroundColor =
UIColor(red: 0.97, green:
0.97, blue: 0.97, alpha:
1.0)
return sectionHeader
}
如果不行,就把Footer换成header,多添加一个selection,这个我试过,行
相关文章推荐
- UI automator
- UVa - 10099 The Tourist Guide 并查集+贪心
- 如何引入GPUImage到自己的项目中
- PHP foreach的两种用法 as $key => $value
- duilib初始化无法获取控件位置(所有位置都为0)
- UIStack View如何让你的开发更简单(iOS 9和Xcode 7)
- 关于uIP移植以及部分特性解析和勘误
- HDU4285 circuits 插头dp
- Android测试详解_3-Building Instrumented Unit Tests-创建仪器单元测试
- uuid
- 安装CocoaPods
- TabBarController-跳出导航
- 关于CAShapeLayer的一些实用案例和技巧
- 编辑器 UEditor 百度富文本web编辑器
- Toj 3990. I guess the gift is a bag! II
- TOJ 3984 I guess the gift is an ipad!
- Toj 3984. I guess the gift is an ipad!
- 303. Range Sum Query - Immutable
- 转载 GUID介绍
- Rabbitmq 学习笔记(二)队列