Exemple #1
0
        public override void LoadView()
        {
            _gesture = new UIPanGestureRecognizer(HandleMoveView);

            _blurView = new UIVisualEffectView(ApplicationTheme.PanelBackgroundMaterial)
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                ClipsToBounds = true
            };

            // Defined in Helpers/ViewExtensions
            var blurShadowContainerView = _blurView.EncapsulateInShadowView();

            View = blurShadowContainerView;

            DisplayedContentView.BackgroundColor = UIColor.Clear;
            DisplayedContentView.ClipsToBounds   = true;

            _blurView.ContentView.AddSubview(DisplayedContentView);

            // Note: most constraint setup happens in ViewWillAppear, because
            // positioning needs to be relative to SuperView, which is only available after LoadView completes

            PanelTopAnchor = blurShadowContainerView.TopAnchor;
        }