UITableView中的beginUpdates和endUpdates

 最近做了个需求,需要在对tableview的headerview里面添加一个webview,而webview的高度不确定。故踩了一下关于beginUpdates和endUpdates的坑,这里记录一下

    self.tableHeaderView.frame = CGRectMake(0, 0, JYEScreenWidth, self.userInfoView.frame.size.height + frame.size.height + self.footerView.frame.size.height);

   //刷新frame

  [self.tableView beginUpdates];

    [self.tableView endUpdates];

原文地址:https://www.cnblogs.com/lrr0618/p/9578699.html