diff --git a/Tusker/Screens/Utilities/MultiColumnNavigationController.swift b/Tusker/Screens/Utilities/MultiColumnNavigationController.swift index 7292a553f1..2be2af359c 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) }