MonoTouch UI Orientation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MonoTouch UI Orientation

mobiledev1600
My app needs orientation set to portrait as well as landscape mode except one screen. On one view i only want to set it to portrait. I have following code but it is not working for portrait mode on that screen

In AppDelegate

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations (UIApplication application, UIWindow forWindow)
    {
        return UIInterfaceOrientationMask.All;
    }

In ViewController

public override bool ShouldAutorotate()
    {
        return true;
    }

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations ()
    {
        return UIInterfaceOrientationMask.Portrait;
    }