title: Child View Controller Resizing
body: <p>I have two child view controllers that are nib files that I display on a parent view controller in the storyboard using:</p>
  
  <pre><code>[self addChildViewController:vc1];
  [vc2 willMoveToParentViewController:nil];
  
  [self transitionFromViewController:vc2
      toViewController:vc1
      duration:1.0
      options:UIViewAnimationOptionTransitionCurlUp
      animations:^{}
      completion:^(BOOL finished) {
          [vc2 removeFromParentViewController];
          [vc1 didMoveToParentViewController:self];
      }];
  </code></pre>
  
  <p>I set the child controllers view's size as free form. I want them to size correctly when using both iPhone4 and iPhone5. By correctly I mean I want the child controller's view and subviews to shrink on iPhone4 to fit the whole view onto the screen and expand to fit the screen on iPhone5. Right now I have the child controller views set for iPhone5. I usually just use IB's autoresizing to make the subviews size correctly on both phones, but it is not working for child view controllers.</p>
  
  <p>I also tried setting it programmatically in the parent controller's <code>viewDidLoad</code>:</p>
  
  <pre><code>self.vc1.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
  </code></pre>
  
  <p>When that did work I tried setting it in the child controller's <code>viewDidLoad</code>:</p>
  
  <pre><code>self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
  </code></pre>
  
  <p>Which also didn't work. So, how do I make child view controller's resize correctly in both iPhone4 and iPhone5?</p>