Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Landscape only iPad application using Mono Touch

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?!

like image 212
Marko Avatar asked Mar 07 '26 17:03

Marko


1 Answers

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.

like image 75
Ertebolle Avatar answered Mar 09 '26 06:03

Ertebolle