We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a761e83 + 56b1d0c commit 4311730Copy full SHA for 4311730
Rg.Plugins.Popup/Platforms/Ios/Impl/PopupPlatformIos.cs
@@ -58,9 +58,9 @@ public Task AddAsync(PopupPage page)
58
PopupWindow window;
59
if (IsiOS13OrNewer)
60
{
61
- var connectedScene = UIApplication.SharedApplication.ConnectedScenes.ToArray().FirstOrDefault(x => x.ActivationState == UISceneActivationState.ForegroundActive);
62
- if (connectedScene != null && connectedScene is UIWindowScene windowScene)
63
- window = new PopupWindow(windowScene);
+ if (UIApplication.SharedApplication.ConnectedScenes.ToArray()
+ .FirstOrDefault(x => x.ActivationState == UISceneActivationState.ForegroundActive && x is UIWindowScene) is UIWindowScene connectedScene)
+ window = new PopupWindow(connectedScene);
64
else
65
window = new PopupWindow();
66
0 commit comments