1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-22 11:13:49 +00:00
Files
mobile/src/iOS.Core/Handlers/CustomWindowHandler.cs

25 lines
682 B
C#

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;
}
}
}