IOS-UITableView手动添加时,Header Section的背景设置
2013-03-02 15:15
573 查看
方法如下: -(UIView*) tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section { UIView*headerView =[[[UIView alloc] initWithFrame:CGRectMake(0,0, tableView.bounds.size.width,30)] autorelease]; if(section == integerRepresentingYourSectionOfInterest) [headerView setBackgroundColor:[UIColor redColor]]; else [headerView setBackgroundColor:[UIColor clearColor]]; return headerView; }
相关文章推荐
- IOS-UITableView手动添加时,Header Section的背景设置
- ios 设置UITableView 选中行cell的背景颜色(自定义选中的背景颜色)
- IOS-UITableView设置背景图片,方式与众不同。
- 给iOS SDK中的表格控件(UITableView)添加背景图
- iOS设置UITableView的背景图片,以及不显示多余的空Cell
- iOS 7 UITableview 在Plain模式下 设置背景颜色无效
- ios开发-设置UITableView/Cell背景设置
- iOS之设置tableView背景图片/让UITableView自动滑动(定位)到某一行cell
- IOS_设置UITableView Section的背景颜色和字体颜色(自定义section布局)
- iOS UITableView设置tableHeaderView时发生约束错误 UIView-Encapsulated-Layout-Height UIView-Encapsulated-Layout-Width
- iOS 为 self.view 设置背景图片被切割的解决方案
- ios UIWebView 展示HTML代码(UITableView 中添加webview 动态计算高度)
- iOS中添加UITapGestureRecognizer手势识别后,UITableView的didSelectRowAtIndexPath失效 或者点击UITableView的空白处收起键盘
- 设置UITableView背景透明/监听cell左边的删除按钮的点击事件
- 【iOS开发-60】案例学习:多组数据的tableView设置、添加右側组索引、多层数据模型设置以及valueForKeyPath
- IOS UIImageview 添加边框 或者设置成圆角
- iOS开发中设置UITableView每组头试图与第一行cell之间的分割线
- iOS开发笔记之三十二——UITableView的UITableViewStyleGrouped风格顶部空白的设置
- IOS-UITableView更改背景以及UITabelViewCell更改背景
- UITableView设置背景为透明时遇到的问题