您的位置:首页 > 移动开发 > IOS开发

iOS怎么修改section的文字颜色

2015-01-12 11:56 246 查看
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{

UIView *view=[[UIView
alloc]init];

UILabel *label=[[UILabel
alloc]initWithFrame:CGRectMake(3,0,200,25)];

if (section==0) {
label.text=@"xxx";
}else
if (section==1){
label.text=@"xxx";
}

label.textColor=[UIColor
grayColor];
[view
addSubview:label];

return view;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: