方法一,以下两个方法的实现

- (void)viewDidLoad {

    [super viewDidLoad];

    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];    

}

- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section{

    UITableViewHeaderFooterView *footer = (UITableViewHeaderFooterView *)view;

    footer.contentView.backgroundColor = [UIColor colorWithRed:237/255.0 green:241/255.0 blue:250/255.0 alpha:1.0];

}

方法二,

在viewDidLoad中调用下面的方法,传入需要处理的tableView即可

-(void)setExtraCellLineHidden: (UITableView *)tableView

{

    UIView *view = [UIView new];

    view.backgroundColor = [UIColor clearColor];

    [tableView setTableFooterView:view];

}

 

posted on 2017-03-08 14:16  成长的过程  阅读(1909)  评论(0编辑  收藏  举报