FabriBertani / Plugin.Maui.ScreenSecurity

Safeguard your .NET MAUI app effortlessly by preventing content exposure, screenshots, and recordings with ease.
MIT License
160 stars 12 forks source link

Bug ios #38

Closed fabien367 closed 2 months ago

fabien367 commented 3 months ago

when the application has screen security activated, several views are added to the super view when focus is lost. Only on iOS. The fix is ​​to loop over the views in order to remove the UIVisualEffectView

In this function:

private static void DisableBlurScreenProtection(UIWindow? window) { if (window is not null) { foreach (var subview in window.Subviews) { if (subview is UIVisualEffectView) { subview.RemoveFromSuperview(); } } _blurBackground = null; } }