title: how to set portrait mode only in our iphone app?
body: <p>i am getting a strange problem in my iPhone app. I want my app to support ONLY portrait mode, but for some reason I can't do it (device &amp; simulator).</p>
  
  <p>To support only portrait mode I did as follow:</p>
  
  <pre><code>In the TARGET summary section on Xcode, I chose only portrait.
  All my ViewControllers implements shouldAutorotateToInterfaceOrientation
  </code></pre>
  
  <p>But as I said it won't work, and the strange result is that the app support ALL the orientations (portrait, upside down, landscape left, landscape right).
  Any ideas?</p>
  
  <p>this how I implement shouldAutorotateToInterfaceOrientation</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
       // Return YES for supported orientations
       NSLog(@"Checking orientation %d", interfaceOrientation);
       return (interfaceOrientation == UIInterfaceOrientationPortrait);
  }
  </code></pre>
  
  <p>Many thanks in advance.</p>