public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); this.NavigationController.SetNavigationBarHidden(true, false); if (SelectedViewController != null) { SelectedViewController.ViewDidLayoutSubviews(); } }
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); } }
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()); } }
public override bool ShouldAutorotate() { return(SelectedViewController == null ? true : SelectedViewController.ShouldAutorotate()); }