File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/Core/src/Platform/iOS Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public override void BuildMenu(IUIMenuBuilder builder)
30
30
31
31
UIWindow ? window = null ;
32
32
33
- if ( OperatingSystem . IsMacCatalystVersionAtLeast ( 14 ) )
33
+ if ( OperatingSystem . IsMacCatalystVersionAtLeast ( 14 ) || OperatingSystem . IsIOSVersionAtLeast ( 14 ) )
34
34
{
35
35
// for iOS 14+ where active apperance is supported
36
36
var activeWindowScenes = new List < UIWindowScene > ( ) ;
@@ -60,10 +60,18 @@ public override void BuildMenu(IUIMenuBuilder builder)
60
60
}
61
61
}
62
62
}
63
- else
63
+ else if ( OperatingSystem . IsMacCatalystVersionAtLeast ( 15 ) || OperatingSystem . IsIOSVersionAtLeast ( 15 ) )
64
64
{
65
65
window = activeWindowScenes [ 0 ] . KeyWindow ;
66
66
}
67
+ else if ( activeWindowScenes [ 0 ] . Windows . Length > 0 )
68
+ {
69
+ window = activeWindowScenes [ 0 ] . Windows [ 0 ] ;
70
+ }
71
+ else
72
+ {
73
+ window = Window ?? this . GetWindow ( ) ?? UIApplication . SharedApplication . GetWindow ( ) ? . Handler ? . PlatformView as UIWindow ;
74
+ }
67
75
}
68
76
}
69
77
else
You can’t perform that action at this time.
0 commit comments