-1

i have iPad app which develop using monodevelop

Now i have problem with orientation with SDK 6.1

the orientation is not working with SDK 6.1 or on device /simulator 6.1

i tried to call ShouldAutoRotate function which return true but it not work

also function willrotate is not call at all !

i think there is another way to enable orientation with SDK 6

any help ?

1 Answers1

3

In iOS6, auto rotate and orientation changes have changed , so i solved the problem using the following steps

1) You will need to assign a root view controller to your main application window on FinishedLaunching.

So if previously like me you have this in your FinishedLaunching(UIApplication app) method in main.cs:

window.AddSubview(mainVC.View);

Replace it with this:

window.RootViewController = mainVC;

2) Replace this:

public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)

With these two functions:

public override bool ShouldAutorotate()
 {
    return true;
 }

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
{

    return UIInterfaceOrientationMask.All;
}

3- you can fire the rotation action using WillRotate function