There is a UIViewController method you can overload. Here is an example
that does landscape only for ipad and portrait only for iphone:

(Note the UserInterfaceIdiomIsPhone method is defined in that class, so you
might need to add it yourself, if MD didn't add it for you)

public override bool ShouldAutorotateToInterfaceOrientation
(UIInterfaceOrientation requested)

 {

 if (!UserInterfaceIdiomIsPhone)

  return requested == UIInterfaceOrientation.LandscapeRight || requested ==
UIInterfaceOrientation.LandscapeLeft;

 return requested == UIInterfaceOrientation.Portrait || requested ==
UIInterfaceOrientation.PortraitUpsideDown;

 }



On Tue, Jan 24, 2012 at 6:46 PM, Deekor <[email protected]> wrote:

> Whats the best way to make it so my app can only be viewed in landscape
> orientation? Ive toggled off both of the portrait orientation buttons in
> the
> info.plist file but when debugging when i rotate my phone to portrait my
> app
> still rotates to portrait mode.
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Orientation-Lock-tp4325808p4325808.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to