Esempio n. 1
0
        protected virtual void ShowModalCardViewController(UIViewController viewController, MvxBasePresentationAttribute attribute, MvxViewModelRequest request)
        {
            viewController.ModalPresentationStyle = UIModalPresentationStyle.Custom;
            viewController.TransitioningDelegate  = FromBottomTransitionDelegate;
            MasterNavigationController.PresentViewController(viewController, true, null);

            ModalViewControllers.Add(viewController);

            FromBottomTransitionDelegate.WireToViewController(viewController, () => ModalViewControllers.Remove(viewController));
        }
Esempio n. 2
0
        private void showModalCardViewController(Type viewType, MvxBasePresentationAttribute attribute, MvxViewModelRequest request)
        {
            var viewController     = (UIViewController)this.CreateViewControllerFor(request);
            var transitionDelegate = new FromBottomTransitionDelegate(
                () => ModalViewControllers.Remove(viewController)
                );

            viewController.ModalPresentationStyle = UIModalPresentationStyle.Custom;
            viewController.TransitioningDelegate  = transitionDelegate;

            TopViewController.PresentViewController(viewController, true, null);

            ModalViewControllers.Add(viewController);
        }
Esempio n. 3
0
        private void showModalCardViewController(UIViewController viewController, MvxBasePresentationAttribute attribute, MvxViewModelRequest request)
        {
            var transitionDelegate = new FromBottomTransitionDelegate(
                () => ModalViewControllers.Remove(viewController)
                );

            viewController.ModalPresentationStyle = UIModalPresentationStyle.Custom;
            viewController.TransitioningDelegate  = transitionDelegate;

            getCurrentControllerForPresenting(MasterNavigationController).PresentViewController(viewController, true, null);

            ModalViewControllers.Add(viewController);

            transitionDelegate.WireToViewController(viewController);
        }
Esempio n. 4
0
        protected virtual void CloseModalViewController(UIViewController modalController)
        {
            if (modalController == null)
            {
                return;
            }

            if (modalController is UINavigationController modalNavController)
            {
                foreach (var item in modalNavController.ViewControllers)
                {
                    item.DidMoveToParentViewController(null);
                }
            }

            modalController.DismissViewController(true, null);
            ModalViewControllers.Remove(modalController);
        }
        public virtual void CloseModalViewController(UIViewController viewController, MvxModalPresentationAttribute attribute)
        {
            if (viewController == null)
            {
                return;
            }

            if (viewController is UINavigationController modalNavController)
            {
                foreach (var item in modalNavController.ViewControllers)
                {
                    item.DidMoveToParentViewController(null);
                }
            }

            viewController.DismissViewController(attribute.Animated, null);
            ModalViewControllers.Remove(viewController);
        }
        protected virtual void CloseModalViewController(UIViewController viewController)
        {
            if (viewController == null)
            {
                return;
            }

            if (viewController is UINavigationController navController)
            {
                foreach (var view in navController.ViewControllers)
                {
                    view.DidMoveToParentViewController(null);
                }
            }

            viewController.DismissViewController(true, null);
            ModalViewControllers.Remove(viewController);
        }
Esempio n. 7
0
        protected virtual Task <bool> CloseModalViewController(UIViewController viewController)
        {
            if (viewController == null)
            {
                return(Task.FromResult(true));
            }

            if (viewController is UINavigationController navController)
            {
                foreach (var view in navController.ViewControllers)
                {
                    view.DidMoveToParentViewController(null);
                }
            }

            viewController.DismissViewController(true, null);
            ModalViewControllers.Remove(viewController);
            return(Task.FromResult(true));
        }
Esempio n. 8
0
        public virtual async Task <bool> CloseModalViewController(UIViewController viewController, MvxModalPresentationAttribute attribute)
        {
            if (viewController == null)
            {
                return(true);
            }

            if (viewController is UINavigationController modalNavController)
            {
                foreach (var item in modalNavController.ViewControllers)
                {
                    item.DidMoveToParentViewController(null);
                }
            }

            await viewController.DismissViewControllerAsync(attribute.Animated);

            ModalViewControllers.Remove(viewController);
            return(true);
        }