title: Constraints break when programmatically customized UITableViewCell is removed from UITableView
body: <p>I am using <code>UITableViewController</code> and I am loading customized <code>UITableViewCell</code>. All elements in the cell and the constraints are configured programmatically. The TableView looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/fuWkb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fuWkb.png" alt="enter image description here"></a>
  All works perfectly except when deleting a cell. I configured the tableView to fade cells when deleted. However, the cell gives a little jerk movement then it goes to the left instead of fading, and I get auto layout error messages in the Console: "Unable to simultaneously satisfy constraints" for below </p>
  
  <pre><code>"&lt;NSLayoutConstraint:0x600002551a40 UIView:0x7fccbd5286f0.height == 100   (active)&gt;",
  "&lt;NSLayoutConstraint:0x6000025505a0 V:|-(16)-[UIView:0x7fccbd5286f0]   (active, names: '|':UITableViewCellContentView:0x7fccbd541b10 )&gt;",
  "&lt;NSLayoutConstraint:0x600002550730 UIView:0x7fccbd5286f0.bottom == UITableViewCellContentView:0x7fccbd541b10.bottom   (active)&gt;",
  "&lt;NSLayoutConstraint:0x6000025605a0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fccbd541b10.height == 1.19209e-07   (active)&gt;"
  </code></pre>
  
  <p>and below </p>
  
  <pre><code>"&lt;NSLayoutConstraint:0x6000025505a0 V:|-(16)-[UIView:0x7fccbd5286f0]   (active, names: '|':UITableViewCellContentView:0x7fccbd541b10 )&gt;",
  "&lt;NSLayoutConstraint:0x600002550730 UIView:0x7fccbd5286f0.bottom == UITableViewCellContentView:0x7fccbd541b10.bottom   (active)&gt;",
  "&lt;NSLayoutConstraint:0x6000025605a0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fccbd541b10.height == 1.19209e-07   (active)&gt;"
  </code></pre>
  
  <p>and that "Will attempt to recover by breaking constraint" for below</p>
  
  <pre><code>&lt;NSLayoutConstraint:0x600002551a40 UIView:0x7fccbd5286f0.height == 100   (active)&gt;
  &lt;NSLayoutConstraint:0x600002550730 UIView:0x7fccbd5286f0.bottom == UITableViewCellContentView:0x7fccbd541b10.bottom   (active)&gt;
  </code></pre>
  
  <blockquote>
    <p>I broke the console output into parts because I couldn't paste it all together for some reason.</p>
  </blockquote>
  
  <p>Basically, I have a <code>UIView</code> called <code>cellView</code> (the white corner rounded area) inside the <code>contentView</code> of the cell. And all other elements you see are inside the <code>cellView</code>. I applied below constraints between the <code>cellView</code> and <code>contentView</code></p>
  
  <pre><code>cellView.translatesAutoresizingMaskIntoConstraints = false
  cellView.heightAnchor.constraint(equalToConstant: 100).isActive = true
  cellView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 16.0).isActive = true
  cellView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true
  cellView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16.0).isActive = true
  cellView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16.0).isActive = true
  </code></pre>
  
  <p>It worked when I tried deactivating all constraints in the cell and its subviews just before deleting the cell. But, when new cells are reused, they didn't have constraints to activate.</p>
  
  <p>How should I handle this case? </p>