title: Custom autolayout constraints broken when adding a controller's view programmatically
body: <p>I have a myController that I insert in code, (in self = a root view controller) this way :</p>
  
  <pre><code>    MyViewController* myController = [[MyViewController alloc] initWithNibName:nil bundle:nil];
      [self addChildViewController:myController];
      [self.view addSubview:myController.view];
      myController.view.frame = CGRectMake(0, 504, 320, 216);
  </code></pre>
  
  <p>In the xib file of MyViewController, I just have 2 views, one on top of the other. Lets say the top view is called View1, and the bottom view View2. View0 is the main view.</p>
  
  <p>I have added the following vertical NSLayoutConstraints :
      V:[View2(40)]
      V:|-(0)-View1   (Names: '|':View0 )
      V:View2-(0)-|   (Names: '|':View0 )
      V:View1-(0)-View2</p>
  
  <p>That is to say View1 touches View0 on top, and View2 on bottom. And View2 touches View1 on top, View0 on bottom, and has a constant height of 40.</p>
  
  <p>When I run this in portrait, every thing seems ok. But when I rotate to landscape, I have sometime the following error.</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;NSAutoresizingMaskLayoutConstraint:0xd17cc00 h=--&amp; v=--&amp; V:[UIView:0xd174a30(268)]&gt;",
  "&lt;NSLayoutConstraint:0x9469890 V:[View2(40)]&gt;",
  "&lt;NSLayoutConstraint:0x9468e90 V:|-(0)-View1   (Names: '|':View0 )&gt;",
  "&lt;NSLayoutConstraint:0x9468ef0 V:View2-(0)-|   (Names: '|':View0 )&gt;",
  "&lt;NSLayoutConstraint:0x94676f0 V:View1-(0)-View2&gt;",
  "&lt;NSAutoresizingMaskLayoutConstraint:0x9450640 h=-&amp;- v=-&amp;- UIView:0000.height == UIView:0xd174a30.height - 268&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x9469890 V:[View2(40)]&gt;
  
  Break on objc_exception_throw to catch this in the debugger.
  The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in &lt;UIKit/UIView.h&gt; may also be helpful.
  </code></pre>
  
  <p>Does anybody understands why this I happening ? And what I should do to keep my defined constraints as prior ?</p>