1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-22 19:23:58 +00:00

PM-3350 iOS extensions TapGestureRecognizer try Window workaround

This commit is contained in:
Federico Maccaroni
2023-11-29 18:42:39 -03:00
parent bfa2a51608
commit a5804df6a3
8 changed files with 174 additions and 78 deletions

View File

@@ -0,0 +1,24 @@
using Microsoft.Maui.Handlers;
using UIKit;
namespace Bit.iOS.Core.Handlers
{
public class CustomWindowHandler : ElementHandler<IWindow, UIWindow>, IWindowHandler
{
public static IPropertyMapper<IWindow, IWindowHandler> Mapper = new PropertyMapper<IWindow, IWindowHandler>(ElementHandler.ElementMapper)
{
};
public CustomWindowHandler() : base(Mapper)
{
}
protected override UIWindow CreatePlatformElement()
{
// Haven't tested
return UIApplication.SharedApplication.Delegate.GetWindow();
//return Platform.GetCurrentUIViewController().View.Window;
}
}
}