// 设置分区头部文字
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *view = [[UIView alloc] init];
UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.view.frame.size.width - 15, 20)];
lab.font = [UIFont systemFontOfSize:15];
// lab.text = @"M";
lab.textAlignment=1;
lab.textColor = [UIColor blueColor];
[view addSubview:lab];
if(section==0){
}else{
lab.text=@"热卖单品";
}
return view;
}
分区文字判断
最新推荐文章于 2024-05-27 20:45:23 发布