From 506d2ad8a96ba9e00c312b294bcb21fa8f42a3f6 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 9 Sep 2024 19:35:15 -0400 Subject: [PATCH] Actually fix multi-column nav scrolling animations this time (hopefully) Closes #539 --- .../Screens/Utilities/MultiColumnNavigationController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Utilities/MultiColumnNavigationController.swift b/Tusker/Screens/Utilities/MultiColumnNavigationController.swift index 7292a553..2be2af35 100644 --- a/Tusker/Screens/Utilities/MultiColumnNavigationController.swift +++ b/Tusker/Screens/Utilities/MultiColumnNavigationController.swift @@ -152,10 +152,10 @@ class MultiColumnNavigationController: UIViewController { let column = stackView.arrangedSubviews[columnIndex] let columnFrame = column.convert(column.bounds, to: scrollView) let offset: CGFloat - if columnFrame.maxX < scrollView.bounds.width - scrollView.adjustedTrailingContentInset { + if columnFrame.maxX <= view.bounds.width - view.safeAreaInsets.left - view.safeAreaInsets.right - scrollView.adjustedTrailingContentInset { offset = -scrollView.adjustedLeadingContentInset } else { - offset = scrollView.contentSize.width - scrollView.bounds.width + scrollView.adjustedTrailingContentInset + offset = columnFrame.maxX - scrollView.bounds.width + scrollView.adjustedTrailingContentInset } scrollView.setContentOffset(CGPoint(x: offset, y: -scrollView.adjustedContentInset.top), animated: animated) }