设置好tableView的tableFooterView
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
最后一行Cell系统分割线顶头,参考:http://blog.sina.com.cn/s/blog_4cd8dd130102v6xq.html
static 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];
}
}
网友评论