示例#1
0
 public override void ViewDidLayoutSubviews()
 {
     base.ViewDidLayoutSubviews();
     this.NavigationController.SetNavigationBarHidden(true, false);
     if (SelectedViewController != null)
     {
         SelectedViewController.ViewDidLayoutSubviews();
     }
 }
示例#2
0
        public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
        {
            if (SelectedViewController != null && !(SelectedViewController is UIAlertController))
            {
                return(SelectedViewController.GetSupportedInterfaceOrientations());
            }

            switch (PreferredOrientations)
            {
            case PreferredOrientation.Portrait:
                return(UIInterfaceOrientationMask.Portrait | UIInterfaceOrientationMask.PortraitUpsideDown);

            case PreferredOrientation.Landscape:
                return(UIInterfaceOrientationMask.Landscape);

            default:
                return(UIInterfaceOrientationMask.All);
            }
        }
示例#3
0
        public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentation()
        {
            if (SelectedViewController != null)
            {
                return(SelectedViewController.PreferredInterfaceOrientationForPresentation());
            }

            switch (PreferredOrientations)
            {
            case PreferredOrientation.Portrait:
                return(InterfaceOrientation == UIInterfaceOrientation.PortraitUpsideDown ?
                       UIInterfaceOrientation.PortraitUpsideDown : UIInterfaceOrientation.Portrait);

            case PreferredOrientation.Landscape:
                return(InterfaceOrientation == UIInterfaceOrientation.LandscapeRight ?
                       UIInterfaceOrientation.LandscapeRight : UIInterfaceOrientation.LandscapeLeft);

            default:
                return(base.PreferredInterfaceOrientationForPresentation());
            }
        }
示例#4
0
 public override bool ShouldAutorotate()
 {
     return(SelectedViewController == null ? true : SelectedViewController.ShouldAutorotate());
 }