title: iPhone Landscape-Only Utility-Template Application
body: <p>I'm trying to create an iPhone application that is always in landscape mode, using the Utility application template.  Here's what I did:</p>
  
  <ul>
  <li>Create a new iPhone application project, using the Utility Application template</li>
  <li>In Interface Builder, rotate all the views 90 degrees.</li>
  <li>In Interface Builder, add a label to the middle of the MainView.  Stretch it all the way across the view, set the alignment to centered, and set the autosizing springs so that it can stretch horizontally.</li>
  <li>In Info.plist, add the key "UIInterfaceOrientation" with value "UIInterfaceOrientationLandscapeRight"</li>
  <li>In the controller classes, change the shouldAutorotateToInterfaceOrientation methods to "return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);"</li>
  <li>Run the app. </li>
  </ul>
  
  <p>When I launch my app, it comes up in landscape orientation, but the main view only covers the top half of the display, and it is stretched horizontally.  I get the same results in both the simulator and on an actual device.  I've seen it with versions 2.2 and 2.2.1 of the SDK.</p>
  
  <p>I have been able to work around the problem by adding the following step to the above:</p>
  
  <ul>
  <li>Add "self.view.autoresizesSubviews = NO;" to RootViewController's viewDidLoad method after "[super viewDidLoad];".</li>
  </ul>
  
  <p>If I do this, then it works as expected. But this feels like a hack. Why should this be necessary?</p>
  
  <p>I don't think it is a transformation issue.  All elements are drawn in the proper orientation and with the proper scaling.  The problem seems to be that the bounds rectangles of the main view gets funky.  It looks like the height of the main view is being cut by a little more than half, and the width is being increased by about 50%.</p>
  
  <p>If I do the exact same set of steps using the View-based Application template instead of Utility, then everything works as expected.  So I'm pretty sure the problem is specific to how a Utility application manages its views.</p>
  
  <p>Anybody understand what's going on here?</p>