public override void WillShowViewController(UINavigationController navigationController, [Transient] UIViewController viewController, bool animated) { var element = _self.ElementForViewController(viewController); bool navBarVisible; if (element is ShellSection) { navBarVisible = _self._renderer.ShowNavBar; } else { navBarVisible = Shell.GetNavBarIsVisible(element); } navigationController.SetNavigationBarHidden(!navBarVisible, true); var coordinator = viewController.GetTransitionCoordinator(); if (coordinator != null) { // handle swipe to dismiss gesture coordinator.NotifyWhenInteractionEndsUsingBlock((context) => { if (!context.IsCancelled) { _self._popCompletionTask = new TaskCompletionSource <bool>(); _self.SendPoppedOnCompletion(_self._popCompletionTask.Task); } }); } }
public override void WillShowViewController(UINavigationController navigationController, [Transient] UIViewController viewController, bool animated) { var element = _self.ElementForViewController(viewController); bool navBarVisible; if (element is ShellSection) { navBarVisible = _self._renderer.ShowNavBar; } else { navBarVisible = Shell.GetNavBarIsVisible(element); } navigationController.SetNavigationBarHidden(!navBarVisible, true); var coordinator = viewController.GetTransitionCoordinator(); if (coordinator != null && coordinator.IsInteractive) { // handle swipe to dismiss gesture if (Forms.IsiOS10OrNewer) { coordinator.NotifyWhenInteractionChanges(OnInteractionChanged); } else { coordinator.NotifyWhenInteractionEndsUsingBlock(OnInteractionChanged); } } }
public override void WillShowViewController(UINavigationController navigationController, [Transient] UIViewController viewController, bool animated) { var element = _self.ElementForViewController(viewController); bool navBarVisible; if (element is ShellSection) { navBarVisible = _self._renderer.ShowNavBar; } else { navBarVisible = Shell.GetNavBarIsVisible(element); } navigationController.SetNavigationBarHidden(!navBarVisible, true); }