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 AppDelegatepublic override UIInterfaceOrientationMask GetSupportedInterfaceOrientations (UIApplication application, UIWindow forWindow)
{
return UIInterfaceOrientationMask.All;
}
In ViewControllerpublic override bool ShouldAutorotate()
{
return true;
}
public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations ()
{
return UIInterfaceOrientationMask.Portrait;
}