diff --git a/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs b/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs index e5514cbac8d4..b6bf80cc64b6 100644 --- a/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs +++ b/src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs @@ -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; @@ -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); - } - } } }