From f8dd673cfd85f7c7e490f1b55bd9a7c64a627021 Mon Sep 17 00:00:00 2001 From: Mustapha-Tarek Date: Mon, 29 Jul 2024 11:57:10 +0200 Subject: [PATCH] PLAYRTS-5582 Fix tab bar offset when scrolling (#505) --- .../Sources/UI/Controllers/PageContainerViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Sources/UI/Controllers/PageContainerViewController.swift b/Application/Sources/UI/Controllers/PageContainerViewController.swift index e99a6a0cf..ba459f767 100644 --- a/Application/Sources/UI/Controllers/PageContainerViewController.swift +++ b/Application/Sources/UI/Controllers/PageContainerViewController.swift @@ -167,6 +167,11 @@ extension PageContainerViewController: ScrollableContentContainer { var play_scrollableChildViewController: UIViewController? { tabContainerViewController.currentViewController } + + func play_contentOffsetDidChange(inScrollableView scrollView: UIScrollView) { + let adjustedOffset = scrollView.contentOffset.y + scrollView.adjustedContentInset.top + tabBarTopConstraint?.constant = max(-adjustedOffset, 0.0) + } } extension PageContainerViewController: SRGAnalyticsContainerViewTracking {