Skip to content

Commit

Permalink
Ensure drag/drop logic still gets hit
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang committed Oct 25, 2023
1 parent 7ccdadb commit c796c36
Showing 1 changed file with 23 additions and 23 deletions.
Expand Up @@ -629,6 +629,29 @@ void LoadRecognizers()

var nativeRecognizers = GetPlatformRecognizer(recognizer);

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DragGestureRecognizer)
{
dragFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDragInteraction == null && PlatformView != null)
{
var interaction = new UIDragInteraction(_dragAndDropDelegate);
interaction.Enabled = true;
PlatformView.AddInteraction(interaction);
}
}

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DropGestureRecognizer)
{
dropFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDropInteraction == null && PlatformView != null)
{
var interaction = new UIDropInteraction(_dragAndDropDelegate);
PlatformView.AddInteraction(interaction);
}
}

if (nativeRecognizers is null)
continue;

Expand All @@ -641,29 +664,6 @@ void LoadRecognizers()

_gestureRecognizers[recognizer] = nativeRecognizer;
}

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DragGestureRecognizer)
{
dragFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDragInteraction == null && PlatformView != null)
{
var interaction = new UIDragInteraction(_dragAndDropDelegate);
interaction.Enabled = true;
PlatformView.AddInteraction(interaction);
}
}

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DropGestureRecognizer)
{
dropFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDropInteraction == null && PlatformView != null)
{
var interaction = new UIDropInteraction(_dragAndDropDelegate);
PlatformView.AddInteraction(interaction);
}
}
}
}

Expand Down

0 comments on commit c796c36

Please sign in to comment.