title: In ios, where's the proper place in a view controller to move your subviews to handle rotations?
body: <p>In ios, where's the best place in a view controller to move your custom subviews around to handle rotations? (of course this is only for those where the autoresizingflags don't help).</p>
  
  <p>Here's the following places i've tried, and the issues each has:</p>
  
  <ul>
  <li>willAnimateRotationToInterfaceOrientation:duration</li>
  </ul>
  
  <p>This works, and any subview frame changes you make are animated nicely as the device is rotated landscape&lt;->portrait. However, if you're in a tab controller, this doesn't get called when another VC is visible. And so if you rotate, and switch back to this tab, it'll have the wrong layout.</p>
  
  <ul>
  <li>viewWillAppear</li>
  </ul>
  
  <p>Doesn't really help, because this gets called before the rotation takes effect, so when accessing self.view.frame you get the pre-rotation sizing, so you can't know whether we're going for landscape or portrait</p>
  
  <ul>
  <li>viewDidAppear</li>
  </ul>
  
  <p>This is better than viewWillAppear, however because it gets called after the view goes on screen, you see a flash of content in the wrong layout before it flicks across.</p>
  
  <p>I just want to know where the proper place is to put my code that lays out my view controller's subviews nicely to handle both layouts, animated nicely. THanks all</p>