太贱了,还需要设置 height,返回的 view的height 不管用,

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

{

    UIView *mView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 150)];

//    mView.backgroundColor =  RGBCOLOR(245, 244, 244);

    mView.backgroundColor = [UIColor greenColor];

    return mView;

}

 

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

{

    return 10;

}

posted @ 2014-06-23 10:06  路在脚下,  阅读(208)  评论(0)    收藏  举报