tableview去掉多余的横线

来源:互联网 发布:电脑软件管理 编辑:程序博客网 时间:2024/05/01 18:05

tableview去掉多余的横线

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

CGRect theFooterRect = theRect;

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

转帖:http://www.cnblogs.com/fairycao/archive/2010/11/30/1892180.html