From 6ed297c62e53a97930834edf82018db14164da6a Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Wed, 29 Jan 2025 13:59:41 +0400 Subject: [PATCH] [ios] fix bug when the layers menu doesn't layouted properly on appear On some ios versions the `tableView.layoutIfNeeded()` is called but the view doesnt set as it should be relayouted. This bug is founded on the iPhone Xs Max 18.2. https://github.com/organicmaps/organicmaps/issues/10143#issuecomment-2620913027 Signed-off-by: Kiryl Kaveryn --- iphone/Maps/UI/BottomMenu/Menu/BottomMenuViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuViewController.swift b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuViewController.swift index 642a24a6aa..d4a2d2b187 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuViewController.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuViewController.swift @@ -43,6 +43,7 @@ class BottomMenuViewController: MWMViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() + tableView.setNeedsLayout() tableView.layoutIfNeeded() heightConstraint.constant = min(tableView.contentSize.height, view.height) tableView.isScrollEnabled = tableView.contentSize.height > heightConstraint.constant;