title: UIActionSheet won't display properly in landscape mode
body: <p>I am trying to display a UIActionsheet in my application.  It works perfectly in portrait mode but when I try to have it display in a landscape orientation it still slides in from the bottom.  However it no longer uses buttons and displays with the picker control like it is in landscape mode. Its just in the wrong position.</p>
  
  <p>I don't use auto rotation and keep everything in portrait mode. Occasionally I am displaying things in a landscape mode and would like the actionsheet to appear properly.</p>
  
  <p>I am setting the status bar orientation like so...</p>
  
  <pre><code>[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft animated:NO];
  </code></pre>
  
  <p>When I'm in 'landscape mode', and the status bar always appears correctly. If i display an AlertView it also displays correctly. I am then displaying the actionsheet like this</p>
  
  <pre><code>UIActionSheet *as = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:nil otherButtonTitles: @"button", nil];    
  as.actionSheetStyle = UIActionSheetStyleBlackOpaque;
  [as showInView:self.view];
  //[as showFromToolbar:toolbar];
  </code></pre>
  
  <p>I have also tried to display it from the app delegate and toolbar. If I set the statusbar orientation just before displaying it still doesn't work. I have even tried.</p>
  
  <pre><code>[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeLeft];
  </code></pre>
  
  <p>Does anyone has any idea why the actionsheet could be displaying in the wrong position yet with the right controls?  Or how to force the actionsheet to display in a particular position.  I would rather not have to implement my own version of an actionsheet to have it display right. </p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit / Solution:</strong> Force Action sheet to show in landscape mode</p>
  
  <p>Here is how i managed to get it to work, i created a landscape view and added it to my main window like so:</p>
  
  <pre><code>landscapeView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 480)];
  landscapeView.transform = CGAffineTransformMakeRotation((-1)*M_PI/2);
  landscapeView.bounds = CGRectMake(0, 0, 480, 380);
  [appDelegate.window addSubview:landscapeView];
  </code></pre>
  
  <p>and then displayed my action sheet like this</p>
  
  <pre><code>if (landscape) {
      [menu showInView:landscapeView];
  } else {
      [menu showInView:self.view];
  }
  </code></pre>
  
  <p>Much thanks to tc. for pointing me in the right direction here.</p>