iOS开发:UITableView自定义SectionHeader
来源:互联网 发布:淘宝如何找相似 编辑:程序博客网 时间:2024/05/22 00:33
要自定义TableView的sectionHeader view(sectionFooter同理),需要实现UITableViewDelegate如下的两个方法:
//自定义section的头部
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 375, 40)];//
//add your code behind
return view;
}
//自定义section头部的高度
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return120.0;
}
注意,UITableView的style:为grouped时,section header会和cell一样划出界面;为plain的时,section header在当前section的cell没有全部滑出界面时,section一直会停留在tableView的顶部。 0 0
- iOS开发:UITableView自定义SectionHeader
- iOS开发经验总结:自定义UITableView
- iOS开发之自定义UITableView
- iOS开发--自定义列表控件(UITableView)
- IOS开发自定义UITableView的Header
- iOS开发:XIB之UITableView自定义cell
- UITableview Plain风格下 SectionHeader悬浮问题
- IOS - 自定义表格(UITableView)
- iOS:自定义UItableview背景图片
- IOS 自定义UITableView
- ios UITableview自定义cell
- IOS - 自定义表格(UITableView)
- iOS开发UITableView 之代码自定义cell的步骤
- iOS开发之UITableView中Cell左滑自定义事件
- [转载][Iphone]iOS UITableView之自定义UITableView
- iOS开发>>>UITableView
- Xamarin ios开发 UITableView
- 【IOS开发】UITableView详解
- studio中打印日志有部分乱码 可以尝试下列方式解决
- hdu 5734 Acperience 2016 Multi-University Training Contest 2
- 提交并发请求时使用FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST等待子并发程序完成
- Scanner,String
- 函数声明和函数表达式的(区别)应用场景注意事项
- iOS开发:UITableView自定义SectionHeader
- 防止重复提交
- Codeforces - 362 (Div. 2)B - Barnicle(模拟)
- C++ 字符串,字符数组,数字之间转换
- java搜索引擎爬虫,抓取url示例(未测试)
- js --- 闭包,垃圾回收机制
- 关于准确率,精确率,召回率,f-值等
- 关于下拉刷新库的属性 控件pull-to-refresh
- DTO(转)