title: Recalculating subview sizes on rotation in iOS 7
body: <p>I have a method I call to calculate the sizes of a bunch of labels I have in a custom <code>UITableViewCell</code> subclass, which is in a <code>UIPopoverController</code>.  When the user rotates the device, I need to recalculate the sizes, and then have the table re-drawn to use the new sizes.  Every method I've tried to detect the rotation is either depreciated, doesn't get called, or doesn't get called at the right time.  Is there a method that will automatically get called when the device is rotated that I can recalculate my sizes in?</p>
  
  <hr>
  
  <p>Edit: What I have tried and why it doesn't work:</p>
  
  <ul>
  <li><code>shouldAutorotate</code> - doesn't get called - apparently depreciated.</li>
  <li><code>layoutSubviews</code> - gets called, but if I try to <code>[self.tableView reloadData]</code> in here, I get stuck in an infinite loop</li>
  <li><code>NSNotificationCenter</code> observer for <code>UIDeviceOrientationDidChangeNotification</code> - Gets called before my controller knows it's new dimensions, so I cannot recalculate my sizes here</li>
  <li><code>[self.tableView setNeedsDisplay]</code> in <code>layoutSubviews</code> - doesn't prompt re-drawing of table.</li>
  <li><code>didRotateFromInterfaceOrientation</code> - doesn't get called - apparently depreciated.</li>
  </ul>
  
  <hr>
  
  <p>Edit 2: More details on what I'm trying to do</p>
  
  <p>I'm trying to imitate a "rows-and-columns" style table, and line up the labels to imitate the columns.  When I recalculate the sizes, I loop through all the rows of the table, then through each "column" in that row.  I get the width of each column, and keep track of the largest width in all the rows for each column.  Then I manipulate the spacing between widths and the font sizes to get it so that if any row has the widest label in every column, it will still fit on the screen.</p>