title: How do I resize a UIView and force its subviews to resize
body: <p>I have a <code>UIScrollView</code> with a <code>UIView</code> as a subview. The <code>UIView</code> has a bunch of data entry fields arranged vertically - essentially just a fixed format data entry Form.</p>
  
  <p>I want to keep the <code>UIView's</code> vertical size and adjust its horizontal size to match the size of the <code>UIScrollView</code> which changes depending on the orientation of the device.  Note that this is all placed in the Detail view of a <code>UISplitViewController</code>.</p>
  
  <p>So the user will have to scroll vertically but not horizontally as all the text fields on the <code>UIView</code> should resize themselves to fit horizontally on the screen.</p>
  
  <p>Currently if I resize the <code>UIView</code> by changing the frame width to match the <code>UIScrollView's</code> frame width then the <code>UIView</code> subviews (the text fields) don't resize themselves according to the constraints setup in IB.  The <code>UIView</code> just seems to get clipped.  There is no horizontal scrolling so this aspect is working correctly.</p>
  
  <p>I have autoresize subviews set on <code>UIView</code> and on <code>UIScrollView</code>.</p>
  
  <p>Any tips on what to do here ?  Also where would I put code to resize the <code>UIView</code> if the device orientation changes ?</p>
  
  <p><strong>Additional information.</strong></p>
  
  <p>I created the <code>UIView</code> in IB as a separate view in the same NIB as the <code>DetailViewController</code> containing the <code>UIScrollView</code>. Because it is much taller than the <code>UIScrollView</code> the only way I can find for creating it in IB is if I set it up as a separate view of the desired width and height.  I then create an IBOutlet and add this view as a subview to <code>UIScrollView</code> in the <code>viewDidLoad</code> method.  This all seems to work find with the views all displaying correctly, with the exception that the <code>UIView</code> subviews are not resized horizontally.</p>
  
  <p>Any suggestions on what I may be doing wrong here?</p>