public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
        {
            if (DisableRotation)
            {
                return(toInterfaceOrientation == InterfaceOrientation);
            }

            UIInterfaceOrientationMask mask        = CurrentViewController.GetSupportedInterfaceOrientations();
            UIInterfaceOrientation     orientation = CurrentViewController.PreferredInterfaceOrientationForPresentation();

            bool theReturn = CurrentViewController == null
                                ? true
                                : CurrentViewController.ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);

            if (CurrentViewController != null)
            {
                Debug.WriteLine("Should auto rotate: " + toInterfaceOrientation.ToString() + ": " + theReturn);
            }
            else
            {
                Debug.WriteLine("Should auto rotate: View is null");
            }

            return(theReturn);
        }
 public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
 {
     if (CurrentViewController != null)
     {
         return(CurrentViewController.GetSupportedInterfaceOrientations());
     }
     return(UIInterfaceOrientationMask.All);
 }
예제 #3
0
		public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
		{
			if (DisableRotation)
				return toInterfaceOrientation == InterfaceOrientation;

			bool theReturn = CurrentViewController == null
				? true
				: CurrentViewController.ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);
			return theReturn;
		}