0

In my application, there will be a UIViewController containing a UITableView and multiple tableview cell.

I have already subclass my tableView cell and link all the UIView form the interface builder to the script.

For better performance I preload all the tableview cell into an array as the data source of the tableView in ViewDidLoad() and reload the tableview.

Also, I set the UITableViewCell have with priority constraint, which there will be some UIView will be removed using removeFromSuperview() when fulfilled some condition.

And here is the problem, the second priority constraint ( https://stackoverflow.com/a/18066138/4851812) did not load well. The removed UIView still appear and the height didn't update.

EDIT: If the just put the cell init on the func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell. It success sometimes, but the performance is poor. So I preload the cell.

Are there any method need to call like forcing the cell update the constraint or layout before passing the cell to the tableView?

Community
  • 1
  • 1
HARZI
  • 171
  • 1
  • 8

0 Answers0