改变group的背景 自定义自己的背景色或者背景图
_tableView.backgroundView = nil; 如果想改图片。把这个图片改成自己设置的图片
_tableView.backgroundColor = [UIColor clearColor];
self.view.backgroundColor = [UIColor blueColor]; //改自己喜欢的颜色
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 1;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
view.backgroundColor = [UIColor redColor];//根据需求改变着个颜色不需要改为clear
return [view autorelease];
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 1;
}
-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
view.backgroundColor = [UIColor redColor];//根据需求改变着个颜色不需要改为clear
return [view autorelease];
}