Update PopupWindow.cs
This commit is contained in:
@@ -24,25 +24,36 @@ namespace Mopups.Platforms.iOS
|
||||
|
||||
}
|
||||
|
||||
public override UIView HitTest(CGPoint point, UIEvent? uievent)
|
||||
public override UIView? HitTest(CGPoint point, UIEvent? uievent)
|
||||
{
|
||||
var platformHandler = (PopupPageRenderer?)RootViewController;
|
||||
var renderer = platformHandler?.Handler;
|
||||
var hitTestResult = base.HitTest(point, uievent);
|
||||
|
||||
if (!(platformHandler?.Handler?.VirtualView is PopupPage formsElement))
|
||||
return hitTestResult;
|
||||
|
||||
if (formsElement.InputTransparent)
|
||||
return null!;
|
||||
|
||||
if (formsElement.BackgroundInputTransparent && renderer?.PlatformView == hitTestResult)
|
||||
try
|
||||
{
|
||||
formsElement.SendBackgroundClick();
|
||||
return null!;
|
||||
var platformHandler = (PopupPageRenderer?)RootViewController;
|
||||
var renderer = platformHandler?.Handler;
|
||||
var hitTestResult = base.HitTest(point, uievent);
|
||||
|
||||
if(renderer?.VirtualView is null)
|
||||
{
|
||||
return hitTestResult;
|
||||
}
|
||||
|
||||
if(renderer.VirtualView is not PopupPage formsElement)
|
||||
return hitTestResult;
|
||||
|
||||
if(formsElement.InputTransparent)
|
||||
return null;
|
||||
|
||||
if(formsElement.BackgroundInputTransparent && renderer.PlatformView == hitTestResult)
|
||||
{
|
||||
formsElement.SendBackgroundClick();
|
||||
return null;
|
||||
}
|
||||
return hitTestResult;
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return hitTestResult;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user