首页 > 其他 > 详细

设置tableView 的Section的title问题

时间:2015-11-21 11:41:30      阅读:331      评论:0      收藏:0      [点我收藏+]
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, 300, 60)];
    titleLabel.text = _dictData.allKeys[section];
    NSLog(@"%@",titleLabel.text);
    titleLabel.textColor = [UIColor lightGrayColor];
    titleLabel.font = [UIFont systemFontOfSize:15];
    NSLog(@"%ld",section);
    return titleLabel;
}

上面的代码是从带二个开始显示的,第一组没有

下面的代码是从头开始显示的

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
    return _dictData.allKeys[section];
}

 

设置tableView 的Section的title问题

原文:http://www.cnblogs.com/fanwenzheIOS/p/4983228.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!