TableView 多余分割线的处理
方法一,以下两个方法的实现
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
}
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section{
UITableViewHeaderFooterView *footer = (UITableViewHeaderFooterView *)view;
footer.contentView.backgroundColor = [UIColor colorWithRed:237/255.0 green:241/255.0 blue:250/255.0 alpha:1.0];
}
方法二,
在viewDidLoad中调用下面的方法,传入需要处理的tableView即可
-(void)setExtraCellLineHidden: (UITableView *)tableView
{
UIView *view = [UIView new];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
}
TableView 多余分割线的处理的更多相关文章
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
IOS8 设置TableView Separatorinset 分割线从边框顶端开始 在ios8上 [TableViewsetSeparatorInset:UIEdgeInsetsMake(0,0 ...
- tableview隐藏多余分割线
- (void)setExtraCellLineHidden: (UITableView *)tableView{ UIView *view =[ [UIView alloc]init]; view. ...
- 模拟器的tableView的分割线不显示
只有iOS9和iPhone6 plus模拟器上TableView分割线不会显示. 原因: 由于iPhone6 plus的分辨率较高,开发的时候同常都使用command + 3 或者 command + ...
- ios8 ios7 tableview cell 分割线左对齐
ios8中左对齐代码 //加入如下代码 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cel ...
- 设置tableView的分割线填满cell的方式总结
方式一:cell的底部添加一个UIView 1.在tableViewController的viewDidLoad中取消系统的分割线 // 取消系统的分割线 self.tableView.separat ...
- SWIFT中隐藏TableView多余的分隔线
在用TableView是如果数据不能填充满整个屏幕时,数据行下面会有空行及分隔线,这样不是很美观,如下 如何把多余的部分删除掉呢,其它很简单,把TableView的Footer替换为一个空的UIVie ...
- IOS tableView 去除分割线 和 不允许选中表格cell
//去除分割线 self.tableView.backgroundColor=[UIColor colorWithRed:///255.0 alpha:1.0]; self.tableView.sep ...
- swift tableview的分割线不能到头
1,设置tableview的separatorInset, layoutMargins if(myTableView.respondsToSelector("setSeparatorInse ...
- UI控件自定义tableView的分割线的样式
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFi ...
随机推荐
- 2.8. 创建 NSManagedObject 的子类 (Core Data 应用程序实践指南)
现在根据模型来创建NSManagedObject的子类.如果模型改变了,那就就重新生成这些文件.所以,不要在生成的文件里自定义方法,因为重新生成之后,这些修改就丢失了.假如确实需要重新生成自定义的方法 ...
- Windows Server 2012的配置与部署
一. 背景 这里以阿里云Windows Server 2012系统的服务器为主,介绍服务器的配置以及.Net程序的发布顺序,在后续的项目管理文章中,会介绍<运维手册>的写法. 二. 步骤 ...
- Everything开机自启
第一步:关闭自动启动 在设置中关闭everything开机自动启动. 第二步:创建计划任务 点击“开始”—“任务计划程序”—“创建任务” 首先设置任务的名称等,注意一定要勾选“使用最高权限运行”. 然 ...
- CRS-2800 CRS-4000
I was installing Clusterware using ASM on VMware shared disks. When I created the independent persi ...
- 分析器错误消息: 无法识别的属性“targetFramework”。
配置错误 说明: 在处理向该请求提供服务所需的配置文件时出错.请检查下面的特定错误详细信息并适当地修改配置文件. 分析器错误消息: 无法识别的属性“targetFramework”.请注意属性名称区分 ...
- SSH系统介绍
SSH的系统中,对象的调用流程是:JSP->Action->Service->DAO->Hibernate,数据的流向是ActionFormBean接受用户的数据,Action ...
- Python内置数据类型总结
python的核心数据类型:(很多语言之提供了数字,字符串,文件数据类型,其他形式的数据类型都以标准库的形式表示 也就是用之前需要import ) ,但是python有很多都是内置的,不需要impor ...
- linux redis 和 windows redis 的安装
Linux 下安装 下载地址:http://redis.io/download,下载最新文档版本. 本教程使用的最新文档版本为 2.8.17,下载并安装: $ wget http://download ...
- python中关于字符串的操作
Python 字符串操作方法大全 python字符串操作实方法大合集,包括了几乎所有常用的python字符串操作,如字符串的替换.删除.截取.复制.连接.比较.查找.分割等,需要的朋友可以参考下 1. ...
- Professional C# 6 and .NET Core 1.0 - What’s New in C# 6
本文为转载,学习研究 What's New in C# 6 With C# 6 a new C# compiler is available. It's not only that a source ...