diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs b/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs index b4a60f63..bb971858 100644 --- a/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/VisualElementRenderer.cs @@ -170,17 +170,16 @@ namespace Xamarin.Forms.Platform.iOS return new SizeF(0, 0); } - public override void Draw(RectangleF rect) + public override void LayoutSubviews() { - base.Draw(rect); - if (_blur != null) + base.LayoutSubviews(); + if (_blur != null && Superview != null) { - _blur.Frame = rect; + _blur.Frame = Bounds; if (_blur.Superview == null) Superview.Add(_blur); } } - protected override void Dispose(bool disposing) { if ((_flags & VisualElementRendererFlags.Disposed) != 0) @@ -289,7 +288,7 @@ namespace Xamarin.Forms.Platform.iOS } _blur = new UIVisualEffectView(blurEffect); - SetNeedsDisplay(); + LayoutSubviews(); } protected virtual void UpdateNativeWidget() |