diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs index 18d4e0465..b00c86f2b 100644 --- a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs +++ b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs @@ -25,6 +25,8 @@ public static void Init() protected override async void OnElementChanged(ElementChangedEventArgs e) { + if (Element is null) return; + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; formsView = Element;