有时候tablewcell上,你要用分割线,但是如果cell太少,就会出现一个cell然后上面还有几条分割线的情况。这个时候,下面这个方法有用了。
- (void)hiddenExtraCellLine: (UITableView *)tableView
{
UIView *view = [[UIView alloc]init];
view.backgroundColor = [UIColor whiteColor];
tableView.tableFooterView = view;
}
然后在viewdidload的时候调用一下就可以。ios 5,6,7,8,9测试有效。
- (void)viewDidLoad
{
[self hiddenExtraCellLine:self.dateVideoTableView];
}