Skip to content

Commit 24e5215

Browse files
committed
Update AcrylicViewHandler.cs
It seems that ExtraDark is supported on iOS 10+. And Maui only supports iOS 11+. So I commented the TryParse line to check if the iOS version is greater than 14.2 and simply returned ExtraDark directly for ExtraDarkEffect Style.
1 parent 65af324 commit 24e5215

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

AcrylicView/Platforms/iOS/AcrylicViewHandler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ private static void MapEffectStyle(AcrylicViewHandler handler, IAcrylicView view
9595
return;
9696

9797
var ver = UIDevice.CurrentDevice.SystemVersion;
98-
if (!float.TryParse(ver, out float version))
99-
return;
98+
//if (!float.TryParse(ver, out float version))
99+
// return;
100+
100101

101102
var style = view.EffectStyle switch
102103
{
103104
EffectStyle.Light => UIBlurEffectStyle.Light,
104105
EffectStyle.Dark => UIBlurEffectStyle.Dark,
105106
EffectStyle.ExtraLight => UIBlurEffectStyle.ExtraLight,
106-
EffectStyle.ExtraDark => version >= 14.2 ? UIBlurEffectStyle.ExtraDark : UIBlurEffectStyle.Dark,
107+
EffectStyle.ExtraDark => UIBlurEffectStyle.ExtraDark,
107108
_ => UIBlurEffectStyle.Light
108109
};
109110
handler.acrylicEffectView.Effect = UIBlurEffect.FromStyle(style);

0 commit comments

Comments
 (0)