title: Supporting orientations IOS
body: <p>Hello i want to support portrait, home button up and down in my application how can i do that?</p>
  
  <p>i go to my project settings check those two <img src="https://i.stack.imgur.com/cd5uy.png" alt="enter image description here"></p>
  
  <p>and i add the code below </p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
      return UIInterfaceOrientationIsPortrait(interfaceOrientation); 
  }
  </code></pre>
  
  <p>I also tried </p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
      return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
  }
  </code></pre>
  
  <p>but none seems to work</p>
  
  <p>any help</p>