partial void DynamicHeight_TouchUpInside(UIButton sender)
        {
            var controller = UIStoryboard.FromName("Main", null).InstantiateViewController("DynamicHeightController");

            var bottomSheetViewController = new BottomSheetViewController(controller);

            this.PresentModalViewController(bottomSheetViewController, false);
        }
        partial void NavigationController_TouchUpInside(UIButton sender)
        {
            var controller = UIStoryboard.FromName("Main", null).InstantiateViewController("BottomSheetNavigationController");

            SheetSize[] sheetSizes = { SheetSize.Fixed(300f) };
            var         bottomSheetViewController = new BottomSheetViewController(controller, sheetSizes);

            this.PresentModalViewController(bottomSheetViewController, false);
        }
Exemple #3
0
        async void OnDidDeselectAnnotationView(object sender, MKAnnotationViewEventArgs e)
        {
            if (!e.View.Selected)
            {
                //Handle Helicopters and Hospitals
                var customView = e.View as CustomMKAnnotationView;
                if (customView.Url == null)
                {
                    return;
                }

                string[] customViewUrl = customView.Url.Split(',');
                if (customViewUrl[0].Equals("Heli"))
                {
                    return;
                }

                customPinView.RemoveFromSuperview();
                customPinView.Dispose();
                customPinView = null;

                removeOverlays();
                ClearAllReceivers();


                var window = UIApplication.SharedApplication.KeyWindow;
                var rootVC = window.RootViewController;
                if (rootVC is BottomSheetViewController)
                {
                    BottomSheetViewController bottomSheet = (BottomSheetViewController)rootVC;
                    await bottomSheet.closeMenu();

                    bottomSheet.StopTimers();
                    bottomSheet.Dispose();
                    bottomSheet = null;
                    window.RootViewController = rootVC.ChildViewControllers[0];
                }
                else
                {
                    PotentialMatchesBottomSheetViewController matchesSheet = (PotentialMatchesBottomSheetViewController)rootVC;
                    await matchesSheet.closeMenu();

                    matchesSheet.StopTimers();
                    matchesSheet.Dispose();
                    matchesSheet = null;
                    window.RootViewController = rootVC.ChildViewControllers[0];
                }
            }
        }