title: Only statusbar is rotating to Landscape (iPhone)
body: <blockquote>
    <p>In One of my Viewcontroller that supports only Portrait orientation. On my
    device when rotate the status bar is rotating to landscape
    orientation. The rest of the view remains in Portrait mode. I want to prevent the roation of statusbar. This
    problem is happening only in IOS7</p>
  </blockquote>
  
  <pre><code>// Overridden function to allow orientations other than the default portrait orientation.
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
  {
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
      {
          // iPhone: support only upright portrait
          return (interfaceOrientation == UIInterfaceOrientationPortrait);
      }
      else 
      {
             // iPad: any orientation is OK
              return YES;
       }
  }
  
  // For iOS6.0 Rotate
  - (BOOL)shouldAutorotate
  {
      return NO;
  }
  </code></pre>