3

I'm using Mono Touch to develop a landscape-only iPad application but the simulator doesn't seem to rotate any of the views (or the main window for that matter) to landscape.

I've set the SDK version and Minimum OS version to 4.2. I have also set the Supported Orientations to Landscape.

Furthermore, I've created a Navigation Controller which overrides the ShouldAutorotateToInterfaceOrientation and sets it to return true. I then added it using window.AddSubview(navigationController.View) but that didn't help either.

I'm using the Rotate Left/Right methods (under Hardware) in the simulator but the whole app rotates with the window and the app stays in Portrait mode. Even the status bar (carrier, time, battery) go off to the right instead of moving up to the top of the screen.

Help?! Anyone?!

Marko
  • 71,361
  • 28
  • 124
  • 158

1 Answers1

1

Have you set the UIInterfaceOrientation key to landscape as well?

Also, in shouldAutorotateToInterfaceOrientation you'll want to only return true if the new orientation matches the orientation you want.

Ertebolle
  • 2,322
  • 2
  • 18
  • 22
  • I'm returning true because at the moment I can't get it to rotate to ANY orientation. And yes I have set the `UIInterfaceOrientation` to `UIInterfaceOrientationLandscapeRight` in the Info.plist file. – Marko Dec 20 '10 at 04:05
  • But does it actually get called? The OS sometimes uses that message as a way to test which orientations are valid even absent a rotation event - if it is getting called it should only return true on landscape, and otherwise the system may be sending it to another view controller instead. – Ertebolle Dec 20 '10 at 05:20
  • Also, you're sure that the orientation lock isn't on in the simulator, right? – Ertebolle Dec 20 '10 at 05:22