Fork me on GitHub

去除多余的cell 和最后一行cell显示顶头底线

  1. 去除多余cell
  2. YourTableview.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];  
  3. 最后一行cell底线顶头显示
  4. 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];

        }

    }

      

posted @ 2016-05-31 10:56  平凡的不平凡  阅读(195)  评论(0编辑  收藏  举报
AmazingCounters.com