diff --git a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ContextScrollViewDelegate.cs b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ContextScrollViewDelegate.cs index c783b67fcc25..af4dcfd475f5 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ContextScrollViewDelegate.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ContextScrollViewDelegate.cs @@ -48,6 +48,7 @@ internal sealed class ContextScrollViewDelegate : UIScrollViewDelegate bool _isDisposed; static WeakReference s_scrollViewBeingScrolled; + bool _draggingEnded; UITableView _table; public ContextScrollViewDelegate(UIView container, List buttons, bool isOpen) @@ -90,6 +91,11 @@ public override void DraggingStarted(UIScrollView scrollView) RemoveHighlight(scrollView); } + public override void DraggingEnded(UIScrollView scrollView, bool willDecelerate) + { + _draggingEnded = true; + } + public void PrepareForDeselect(UIScrollView scrollView) { RestoreHighlight(scrollView); @@ -114,13 +120,14 @@ public override void Scrolled(UIScrollView scrollView) b.Frame = new RectangleF(scrollView.Frame.Width + (count - (i + 1)) * ioffset, 0, width, rect.Height); } - if (scrollView.ContentOffset.X == 0) + if (_draggingEnded && scrollView.ContentOffset.X == 0) { IsOpen = false; SetButtonsShowing(false); RestoreHighlight(scrollView); s_scrollViewBeingScrolled = null; + _draggingEnded = false; ClearCloserRecognizer(GetContextCell(scrollView)); ClosedCallback?.Invoke(); } diff --git a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs index bd2e54e64115..0028910266f6 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs @@ -1655,7 +1655,7 @@ void UpdateNavigationBarVisibility(bool animated) return; var hasNavBar = NavigationPage.GetHasNavigationBar(current); - if (!_navigation.TryGetTarget(out NavigationRenderer navigationRenderer)) + if (_navigation.TryGetTarget(out NavigationRenderer navigationRenderer)) { navigationRenderer._hasNavigationBar = hasNavBar; }