예제 #1
0
        void UpdateMasterDetailContainers()
        {
            ((MasterDetailPage)Element).Master.PropertyChanged -= HandleMasterPropertyChanged;

            EmptyContainers();

            if (Platform.GetRenderer(((MasterDetailPage)Element).Master) == null)
            {
                Platform.SetRenderer(((MasterDetailPage)Element).Master, Platform.CreateRenderer(((MasterDetailPage)Element).Master));
            }
            if (Platform.GetRenderer(((MasterDetailPage)Element).Detail) == null)
            {
                Platform.SetRenderer(((MasterDetailPage)Element).Detail, Platform.CreateRenderer(((MasterDetailPage)Element).Detail));
            }

            var masterRenderer = Platform.GetRenderer(((MasterDetailPage)Element).Master);
            var detailRenderer = Platform.GetRenderer(((MasterDetailPage)Element).Detail);

            ((MasterDetailPage)Element).Master.PropertyChanged += HandleMasterPropertyChanged;

            UIView masterView = masterRenderer.NativeView;

            _masterController.View.AddSubview(masterView);
            _masterController.AddChildViewController(masterRenderer.ViewController);

            UIView detailView = detailRenderer.NativeView;

            _detailController.View.AddSubview(detailView);
            _detailController.AddChildViewController(detailRenderer.ViewController);

            SetNeedsStatusBarAppearanceUpdate();
            if (System.Maui.Maui.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
            {
                SetNeedsUpdateOfHomeIndicatorAutoHidden();
            }

            detailRenderer.ViewController.View.Superview.BackgroundColor = System.Maui.Color.Black.ToUIColor();

            ToggleAccessibilityElementsHidden();
        }
예제 #2
0
        void TeardownPage(Page page, int index)
        {
            page.PropertyChanged -= OnPagePropertyChanged;

            Platform.SetRenderer(page, null);
        }