title: How to get orientation-dependent height and width of the screen?
body: <p>I'm trying to programmatically determine the current height and width of my application. I use this:</p>
  
  <pre><code>CGRect screenRect = [[UIScreen mainScreen] bounds];
  </code></pre>
  
  <p>But this yields a width of 320 and a height of 480, regardless of whether the device is in portrait or landscape orientation. How can I determine the <em>current</em> width and height (i.e. dependent upon the device orientation) of my main screen?</p>