您的位置:首页 > 产品设计 > UI/UE

IOS-UITableView手动添加时,Header Section的背景设置

2013-10-10 11:12 691 查看
方法如下:
-(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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: