Skip to content

Commit

Permalink
Reference to our own CustomHGR and target object (#10665)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang authored Oct 13, 2022
1 parent bf702eb commit 8a9088f
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@ namespace Microsoft.Maui.Controls.Platform.iOS;

internal class CustomHoverGestureRecognizer : UIHoverGestureRecognizer
{
NSObject _target;

#pragma warning disable CA1416
public CustomHoverGestureRecognizer(NSObject target, Selector action) : base(target, action)
{
_target = target;
}
#pragma warning restore CA1416

#pragma warning disable CA1416
internal CustomHoverGestureRecognizer(Action<UIHoverGestureRecognizer> action)
: base(new Callback(action), Selector.FromHandle(Selector.GetHandle("target:"))!) { }
: this(new Callback(action), Selector.FromHandle(Selector.GetHandle("target:"))!) { }
#pragma warning restore CA1416

[Register("__UIHoverGestureRecognizer")]
Expand Down

0 comments on commit 8a9088f

Please sign in to comment.