title: How to set frame size for iphone 5
body: <p>I am setting my iphone app screen frames to support iphone 5 , i have set the auto resizing mask <img src="https://i.stack.imgur.com/SMwfn.png" alt="mask">  and also i tried by setting the frame programmatically using the following code in <code>loadview</code> </p>
  
  <pre><code>if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
      {
          CGSize result = [[UIScreen mainScreen] bounds].size;
          if(result.height == 480)
          {
              // iPhone Classic
          }
          if(result.height &gt; 480)
          {
              // iPhone 5
             CGRect mainFrame = CGRectMake(0, 0, 320, 568);
             self.view.frame = mainFrame;
          }
      }
  </code></pre>
  
  <p>but it didnt work <img src="https://i.stack.imgur.com/2eeHe.png" alt="didn&#39;t work"> , </p>
  
  <p>can any one tell me how do i set the frame , thanx in advance</p>