title: Adding subview to cell dynamically is causing layout constraint error output
body: <p>I have a table cell view that consists of a couple of buttons and some details. The details are hidden until one of the buttons is touched, and removed when the other button is touched. I am using auto layout.</p>
  
  <p>Here is the code for adding the controls and configuring constraints (controls have been renamed to protect my client). Code is C# but equivalent Obj-C/Swift should be fairly obvious:</p>
  
  <pre><code>this.ContentView.AddSubviews(this.firstButton, this.secondButton);
  this.detailView.AddSubviews(this.textField1, this.textField2, this.textField3, this.textField4, this.textField5);
  
  this.ContentView.ConstrainLayout(() =&gt;
      this.firstButton.Top() == this.ContentView.Top() + Layout.StandardSiblingViewSpacing &amp;&amp;
      this.firstButton.Bottom() &lt;= this.ContentView.Bottom() - Layout.StandardSiblingViewSpacing &amp;&amp;
      this.firstButton.Left() == this.ContentView.Left() + Layout.StandardSuperviewSpacing &amp;&amp;
      this.secondButton.Top() == this.firstButton.Top() &amp;&amp;
      this.secondButton.Bottom() &lt;= this.ContentView.Bottom() - Layout.StandardSiblingViewSpacing &amp;&amp;
      this.secondButton.Left() == this.firstButton.Left());
  
  this.detailView.ConstrainLayout(() =&gt;
      this.textField1.Top() == this.detailView.Top() &amp;&amp;
      this.textField1.Left() == this.detailView.Left() &amp;&amp;
      this.textField1.Right() == this.detailView.Right() &amp;&amp;
      this.textField2.Top() == this.textField1.Bottom() + Layout.StandardSiblingViewSpacing &amp;&amp;
      this.textField2.Left() == this.textField1.Left() &amp;&amp;
      this.textField2.Right() == this.textField1.Right() &amp;&amp;
      this.textField3.Top() == this.textField2.Bottom() + Layout.StandardSiblingViewSpacing &amp;&amp;
      this.textField3.Left() == this.textField2.Left() &amp;&amp;
      this.textField3.Right() == this.textField2.Right() &amp;&amp;
      this.textField4.Top() == this.textField3.Bottom() + Layout.StandardSiblingViewSpacing &amp;&amp;
      this.textField4.Left() == this.textField3.Left() &amp;&amp;
      this.textField4.Right() == this.textField3.Right() &amp;&amp;
      this.textField5.Top() == this.textField4.Bottom() + Layout.StandardSiblingViewSpacing &amp;&amp;
      this.textField5.Bottom() &lt;= this.detailView.Bottom() - Layout.StandardSiblingViewSpacing &amp;&amp;
      this.textField5.Left() == this.textField4.Left() &amp;&amp;
      this.textField5.Right() == this.textField4.Right());
  </code></pre>
  
  <p>The code to animate in the <code>detailView</code> looks like this:</p>
  
  <pre><code>private void AnimateDetailsIn()
  {
      this.ContentView.AddSubview(this.detailView);
      this.ContentView.ConstrainLayout(() =&gt;
          this.detailView.Top() == this.ContentView.Top() + Layout.StandardSiblingViewSpacing &amp;&amp;
          this.detailView.Bottom() &lt;= this.ContentView.Bottom() - Layout.StandardSiblingViewSpacing &amp;&amp;
          this.detailView.Left() == this.secondButton.Right() + Layout.StandardSiblingViewSpacing &amp;&amp;
          this.detailView.Right() == this.ContentView.Right() - Layout.StandardSuperviewSpacing);
  
      var tableView = this.FindParent&lt;UITableView&gt;();
  
      if (tableView == null)
      {
          return;
      }
  
      tableView.BeginUpdates();
      tableView.EndUpdates();
  }
  </code></pre>
  
  <p>Whenever <code>AnimateDetailsIn</code> is called everything <em>looks</em> perfectly fine on screen, but I see this error message in the output:</p>
  
  <pre><code>Unable to simultaneously satisfy constraints.
      Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
  (
      "&lt;NSLayoutConstraint:0x7fccb670 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fd8efd0(36)]&gt;",
      "&lt;NSLayoutConstraint:0x7fd94330 V:|-(0)-[UITextField:0x7fd905a0]   (Names: '|':UIView:0x7fd90050 )&gt;",
      "&lt;NSLayoutConstraint:0x7fd943c0 V:[UITextField:0x7fd905a0]-(8)-[UITextField:0x7fd90e90]&gt;",
      "&lt;NSLayoutConstraint:0x7fd94450 V:[UITextField:0x7fd90e90]-(8)-[UITextField:0x7fd91720]&gt;",
      "&lt;NSLayoutConstraint:0x7fd944e0 V:[UITextField:0x7fd91720]-(8)-[UITextField:0x7fd91fb0]&gt;",
      "&lt;NSLayoutConstraint:0x7fd94570 V:[UITextField:0x7fd91fb0]-(8)-[UITextField:0x7fd92850]&gt;",
      "&lt;NSLayoutConstraint:0x7fd945a0 UITextField:0x7fd92850.bottom &lt;= UIView:0x7fd90050.bottom - 8&gt;",
      "&lt;NSLayoutConstraint:0x7fdaa080 V:|-(8)-[UIView:0x7fd90050]   (Names: '|':UITableViewCellContentView:0x7fd8efd0 )&gt;",
      "&lt;NSLayoutConstraint:0x7fdaa200 UIView:0x7fd90050.bottom &lt;= UITableViewCellContentView:0x7fd8efd0.bottom - 8&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x7fd94570 V:[UITextField:0x7fd91fb0]-(8)-[UITextField:0x7fd92850]&gt;
  </code></pre>
  
  <p>To troubleshoot, I tried including <code>detailView</code> in the view hierarchy from the get-go and removing the animations. This worked fine (no error output and everything displayed correctly). So clearly there's something not quite right about how I'm going about things here. Can anyone tell me how to animate my <code>detailView</code> in using auto layout without getting the error output?</p>