Beispiel #1
0
        async Task <Page> INavigation.PopModalAsync(bool animated)
        {
            var modal = _modals.Last();

            _modals.Remove(modal);
            modal.DescendantRemoved -= HandleChildRemoved;

            var controller = GetRenderer(modal) as UIViewController;

            if (_modals.Count >= 1 && controller != null)
            {
                await controller.DismissViewControllerAsync(animated);
            }
            else
            {
                await _renderer.DismissViewControllerAsync(animated);
            }

            modal.DisposeModalAndChildRenderers();

            if (!IsModalPresentedFullScreen(modal))
            {
                Page.GetCurrentPage()?.SendAppearing();
            }

            return(modal);
        }
Beispiel #2
0
        async Task <Page> INavigation.PopModalAsync(bool animated)
        {
            var modal = _modals.Last();

            _modals.Remove(modal);
            modal.DescendantRemoved -= HandleChildRemoved;

            var controller = GetRenderer(modal) as UIViewController;

            if (_modals.Count >= 1 && controller != null)
            {
                await controller.DismissViewControllerAsync(animated);
            }
            else
            {
                await _renderer.DismissViewControllerAsync(animated);
            }

            modal.DisposeModalAndChildRenderers();

            return(modal);
        }