diff --git a/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs b/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs index 63dc064fd595..d70b9c92c8d9 100644 --- a/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs +++ b/src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs @@ -14,6 +14,10 @@ public class ReorderableItemsViewController : GroupableItemsViewCont bool _disposed; UILongPressGestureRecognizer _longPressGestureRecognizer; +#if MACCATALYST + const double defaultMacCatalystPressDuration = 0.1; +#endif + public ReorderableItemsViewController(TItemsView reorderableItemsView, ItemsViewLayout layout) : base(reorderableItemsView, layout) { @@ -162,6 +166,12 @@ public void UpdateCanReorderItems() if (_longPressGestureRecognizer == null) { _longPressGestureRecognizer = new UILongPressGestureRecognizer(HandleLongPress); +#if MACCATALYST + // On Mac Catalyst, we disable the default drag interaction and instead handle dragging using a long press gesture recognizer. + // Since a long press typically takes more time to trigger than the system's default drag interaction, + // we reduce the minimum press duration to 0.1 seconds to better match the previous behavior. + _longPressGestureRecognizer.MinimumPressDuration = defaultMacCatalystPressDuration; +#endif CollectionView.AddGestureRecognizer(_longPressGestureRecognizer); } } diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs index 2114d4eecc35..2cf389c6a485 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs @@ -14,6 +14,10 @@ public class ReorderableItemsViewController2 : GroupableItemsViewCon bool _disposed; UILongPressGestureRecognizer _longPressGestureRecognizer; +#if MACCATALYST + const double defaultMacCatalystPressDuration = 0.1; +#endif + public ReorderableItemsViewController2(TItemsView reorderableItemsView, UICollectionViewLayout layout) : base(reorderableItemsView, layout) { @@ -162,6 +166,12 @@ public void UpdateCanReorderItems() if (_longPressGestureRecognizer == null) { _longPressGestureRecognizer = new UILongPressGestureRecognizer(HandleLongPress); +#if MACCATALYST + // On Mac Catalyst, we disable the default drag interaction and instead handle dragging using a long press gesture recognizer. + // Since a long press typically takes more time to trigger than the system's default drag interaction, + // we reduce the minimum press duration to 0.1 seconds to better match the previous behavior. + _longPressGestureRecognizer.MinimumPressDuration = defaultMacCatalystPressDuration; +#endif CollectionView.AddGestureRecognizer(_longPressGestureRecognizer); } }