tableView的表头
来源:互联网 发布:日本强大知乎 编辑:程序博客网 时间:2024/06/05 20:15
1.创建headerview(注意创建表头的代码一定要在布局tableview的代码之前调用)
-(void)setHeadView{
headView =[[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, SP_W(80))];
/*
在headerview上添加相应的控件
*/
}
-(void)setFooterView {
footerView = [[UIView alloc] init];
footerView.frame = CGRectMake(0, 0, WIDTH, 115);
footerView.backgroundColor = [UIColor whiteColor];
//背景阴影
UILabel *cutLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 10)];
cutLabel.backgroundColor = BGCOLOR;
[footerView addSubview:cutLabel];
//年票抵扣
UILabel *yearLable = [[UILabel alloc] init];
yearLable.text = @"年票抵扣";
CGSize yearSize = [yearLable sizeThatFits:CGSizeMake(WIDTH, 25)];
yearLable.frame = CGRectMake(10, CGRectGetMaxY(cutLabel.frame) + 15, yearSize.width, 25);
yearLable.textColor = TEXTCOLOR;
yearLable.font = FONT(15);
[footerView addSubview:yearLable];
orderTab.tableHeaderView = headView; //表头
orderTab.tableFooterView = footerView; //表尾
- tableView的表头
- TableView的tableHeaderView表头自适应(表头Masonry)
- tableview添加表头
- 让UITableView的表头随着tableView一起滚动
- 让UITableView的表头随着tableView一起滚动
- TableView 下拉放大表头图片
- tableview下拉 表头缩放效果
- iOS—怎样让UITableView的表头随着tableView一起滚动?这样解决
- TableView之表头、表尾,区头、区尾!
- UIKit-TableView--简单的TableView
- 使用Masonry动态设置tableview表头---tableHeaderView(解决表头背景色设置不了问题)
- 固定表头的CSS
- 可编辑的表头
- 固定表头的DataGrid
- GridView表头的使用
- 自定义Gridview的表头
- 合并GridView的表头
- 三行表头的gridview
- android Mediaplayer各种属性和方法简单介绍(copy自随笔)
- css常用笔记
- 大文件切割上传
- CTex: can not find psfig.sty
- linux清屏命令clear和reset
- tableView的表头
- AJAX用法示例详解
- C#委托的介绍(delegate、Action、Func、predicate)
- 在nginx中x-sendfile解决方案
- [李景山php]每天TP5-20161214|App.php
- RCNN基础资料
- Http 206 文件断点续传下载原理
- 00 caffe-学习笔记
- java json字符串操作