title: updateViewConstraints gives "Impossible to set up layout with view hierarchy unprepared for constraint"
body: <p>I have a View Controller that inits a child View Controller in ViewDidLoad. </p>
  
  <pre><code>- (void)viewDidLoad {
      mapVC = [[CollectionMapViewController alloc] init];
  }
  </code></pre>
  
  <p>It then adds this VC as a subview in an IBAction method:</p>
  
  <pre><code>- (IBAction)left_seg1:(id)sender {                
              [mapVC layoutMapView];
              [self.view addSubview:mapVC.view];
              NSLog(@"num 1");
              _tagTwo = 3;
              return;
  }
  </code></pre>
  
  <p>I am trying to create constraints for the subview with respect to its parent view. In my attempt to do so, I have added updateViewConstraints to the parent class.</p>
  
  <pre><code>- (void)updateViewConstraints{
      self.view.translatesAutoresizingMaskIntoConstraints = NO;
      mapVC.view.translatesAutoresizingMaskIntoConstraints = NO;
  
      NSLayoutConstraint* trailConstrain=[NSLayoutConstraint constraintWithItem:mapVC.view attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:10];
      NSLayoutConstraint* leadingConstrain=[NSLayoutConstraint constraintWithItem:mapVC.view attribute:NSLayoutAttributeLeading   relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeading multiplier:1.0 constant:10];
      [self.view addConstraints:@[trailConstrain, leadingConstrain]];
  
  }
  </code></pre>
  
  <p>However, this generates the following runtime exception:  </p>
  
  <pre><code>Assertion failure in -[UIView _layoutEngine_didAddLayoutConstraint:
  roundingAdjustment:mutuallyExclusiveConstraints:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.7.47/NSLayoutConstraint_UIKitAdditions.m:649
      **Impossible to set up layout with view hierarchy unprepared for constraint**
  </code></pre>
  
  <p>I looked at other threads and the problem was that they had set up constraints in <code>viewDidLoad</code>, but I haven't done that. </p>