-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
在该事件中判断是否为最后一行再调用该方法
//设置最后一行的分割线边距为零
-(void)setLastCellSeperatorToLeft:(UITableViewCell *)cell
{
if([cell respondsToSelector:@selector(setSeparatorInset:)])
{
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if([cell respondsToSelector:@selector(setLayoutMargins:)])
{
[cell setLayoutMargins:UIEdgeInsetsZero];
}
if([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)])
{
[cell setPreservesSuperviewLayoutMargins:NO];
}
}
//将多余的行清除
-(void)hideline
{
_tb.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
}