title: AutoLayout constraints for a autoresizing view created in ViewController's loadView
body: <p>My <code>UIViewController</code> creates its view by overwriting the loadView method:</p>
  
  <pre><code>- (void)loadView {
      UIView *view = [[UIView alloc] init];
      view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
      self.view = view;
  }
  </code></pre>
  
  <p>Now I'd like to switch to AutoLayout and therefore add an</p>
  
  <pre><code>view.translatesAutoresizingMaskIntoConstraints = NO;
  </code></pre>
  
  <p>to the loadView method. Now I have to specify the same constraints which were autogenerated before. My approach was to overwrite updateViewConstraints with</p>
  
  <pre><code>- (void)updateViewConstraints {
      if (0 == [[self.view constraints] count]) {
          NSDictionary* views = @{@"view" : self.view};
  
          [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[view]|" options:0 metrics:0 views:views]];
          [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[view]|" options:0 metrics:0 views:views]];
       }
  
      [super updateViewConstraints];
  }
  </code></pre>
  
  <p>But I get an exception because I think this kind of constraints should go with the super view:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view.  Does the constraint reference something from outside the subtree of the view?  That's illegal.
  </code></pre>
  
  <p>So, how do the correct Contraints have to look like?</p>