tableview,如果数据量少时,会出现很多横线,为此添加footview,就可以去掉多余的横线。

CGRect theFooterRect = theRect;

    theFooterRect.size.height -= 46;
    UIView * newFooterView = [[UIView alloc] initWithFrame:theFooterRect];
    self.tableView.tableFooterView = newFooterView;
    [newFooterView release];

相关文章: