コード例 #1
0
 public void PresentationControllerDidDismiss(UIPresentationController presentationController)
 {
     if (DidDismiss != null)
     {
         DidDismiss(presentationController);
     }
 }
コード例 #2
0
        public void DidDismiss(UIPresentationController _)
        {
            var window = (_modal.VirtualView as Page)?.Window;

            if (window?.Page is Shell shell)
            {
                // The modal page might have a NavigationPage so it's not enough to just send
                // GotoAsync(..) we need build up what the uri will be once the last modal page is removed
                // and then submit that to shell
                var modalStack = new List <Page>(shell.CurrentItem.CurrentItem.Navigation.ModalStack);
                if (modalStack.Count > 0)
                {
                    modalStack.RemoveAt(modalStack.Count - 1);
                }

                var result = ShellNavigationManager.GetNavigationParameters(
                    shell.CurrentItem,
                    shell.CurrentItem.CurrentItem,
                    shell.CurrentItem.CurrentItem.CurrentItem,
                    shell.CurrentItem.CurrentItem.Stack, modalStack);

                shell.NavigationManager.GoToAsync(result).FireAndForget();
            }
            else
            {
                ((Page)_modal.VirtualView).Navigation.PopModalAsync(false).FireAndForget();
            }
        }
コード例 #3
0
 public void PresentationControllerWillDismiss(UIPresentationController presentationController)
 {
     if (WillDismiss != null)
     {
         WillDismiss(presentationController);
     }
 }
コード例 #4
0
		public override UIPresentationController GetPresentationControllerForPresentedViewController (
			UIViewController presentedViewController,
			UIViewController presentingViewController,
			UIViewController sourceViewController)
		{
			presentationController = new CoolPresentationController (presentedViewController, presentingViewController);
			return presentationController;
		}
コード例 #5
0
 public override UIPresentationController GetPresentationControllerForPresentedViewController(
     UIViewController presentedViewController,
     UIViewController presentingViewController,
     UIViewController sourceViewController)
 {
     presentationController = new CoolPresentationController(presentedViewController, presentingViewController);
     return(presentationController);
 }
コード例 #6
0
 public bool PresentationControllerShouldDismiss(UIPresentationController presentationController)
 {
     if (ShouldDismiss != null)
     {
         return(ShouldDismiss(presentationController));
     }
     else
     {
         return(true);    // view should be dismissible by default
     }
 }
コード例 #7
0
		public UIKit.UIViewController GetViewControllerForAdaptivePresentation (UIPresentationController controller, UIModalPresentationStyle style)
		{
			/*
			Load and return the adapted view controller from the Detail storyboard. 
			That storyboard is stored within the same bundle that contains this 
			class.
			*/

			var adaptableFormSheetSegueBundle = NSBundle.FromClass (new Class (typeof(AdaptableFormSheetSegue)));
			return UIStoryboard.FromName ("Detail", adaptableFormSheetSegueBundle).InstantiateViewController ("Adapted");
		}
コード例 #8
0
        public UIKit.UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
        {
            /*
             * Load and return the adapted view controller from the Detail storyboard.
             * That storyboard is stored within the same bundle that contains this
             * class.
             */

            var adaptableFormSheetSegueBundle = NSBundle.FromClass(new Class(typeof(AdaptableFormSheetSegue)));

            return(UIStoryboard.FromName("Detail", adaptableFormSheetSegueBundle).InstantiateViewController("Adapted"));
        }
コード例 #9
0
        public UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
        {
            var navController = new UINavigationController(controller.PresentedViewController);

            if (navController != null)
            {
                var closeText = GetPopoverCloseText(navController.TopViewController);
                doneItem          = new UIBarButtonItem(closeText, UIBarButtonItemStyle.Done, null);
                doneItem.Clicked += DoneTapped;
                navController.TopViewController.NavigationItem.RightBarButtonItem = doneItem;
            }

            return(navController);
        }
コード例 #10
0
ファイル: FolderPicker.iOS.cs プロジェクト: MartinZikmund/Uno
 public override void DidDismiss(UIPresentationController controller)
 => _taskCompletionSource.SetResult(null);
コード例 #11
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller, UITraitCollection traitCollection)
 {
     return(UIModalPresentationStyle.None);
 }
コード例 #12
0
		public async void DidDismiss(UIPresentationController presentationController)
		{
			await Application.Current.NavigationProxy.PopModalAsync(false);
		}
コード例 #13
0
 public override void DidDismiss(UIPresentationController presentationController) =>
 PickHandler?.Invoke(null);
コード例 #14
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(
     UIPresentationController forPresentationController) => UIModalPresentationStyle.None;
コード例 #15
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _dismissModal();
 }
コード例 #16
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     ActivityMediator.Instance.Cancel();
 }
コード例 #17
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(UIModalPresentationStyle.FullScreen);
 }
コード例 #18
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _presenter.ClosedModalViewController(_viewController, _attribute);
 }
コード例 #19
0
 public static UIViewController GetAdaptivePresentationStyle(IUIAdaptivePresentationControllerDelegate This, UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
コード例 #20
0
 public virtual UIViewController GetAdaptivePresentationStyle(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
コード例 #21
0
ファイル: MenuPresenter.cs プロジェクト: Sphere10/Framework
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(_getAdaptivePresentationStyle(forPresentationController));
 }
 public override UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return(new UINavigationController(controller.PresentedViewController));
 }
コード例 #23
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _viewController.TableView.ReloadData();
 }
コード例 #24
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller, UITraitCollection traitCollection)
 {
     return(traitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Compact ? UIModalPresentationStyle.FullScreen : UIModalPresentationStyle.FormSheet);
 }
コード例 #25
0
		public UIModalPresentationStyle GetAdaptivePresentationStyle (UIPresentationController controller, UITraitCollection traitCollection)
		{
			return traitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Compact ? UIModalPresentationStyle.FullScreen : UIModalPresentationStyle.FormSheet;
		}
コード例 #26
0
 public override bool ShouldDismiss(UIPresentationController presentationController)
 {
     return(true);
 }
コード例 #27
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller)
 {
     return(UIModalPresentationStyle.None);
 }
コード例 #28
0
 public void DidDismiss(UIPresentationController presentationController)
 {
     ReplSceneDelegate.Instance?.SetActiveScreen(this);
 }
コード例 #29
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller,
                                                                       UITraitCollection traitCollection) => UIModalPresentationStyle.None;
コード例 #30
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _taskCompletionSource.TrySetResult(Array.Empty <SampleItem>());
 }
コード例 #31
0
 public void DidDismiss(UIPresentationController presentationController)
 {
     closedAction.Invoke();
 }
コード例 #32
0
		UIModalPresentationStyle AdaptivePresentationStyleForPresentationController (UIPresentationController controller)
		{
			return UIModalPresentationStyle.None;
		}
コード例 #33
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     dismissHandler?.Invoke();
     dismissHandler = null;
 }
コード例 #34
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     DismissModalAction?.Invoke();
 }