title: What is the proper way to set an iPhone's orientation programmatically?
body: <p>Will Apple accept the following code?</p>
  
  <p><code>[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];</code></p>
  
  <p>When I write this, I see the following warning:</p>
  
  <blockquote>
    <p>warning: 'UIDevice' may not respond to '-setOrientation:'</p>
  </blockquote>
  
  <p>So what can I do to set the iPhone's orientation programmatically?</p>