From f84461bff8361847c4a0e6c1c589ce40bed79478 Mon Sep 17 00:00:00 2001 From: Yannik Bloscheck Date: Sat, 23 Aug 2025 19:20:43 +0200 Subject: [PATCH] [ios] Stop overlap between last search results and home indicator Signed-off-by: Yannik Bloscheck --- .../Tabs/CategoriesTab/SearchCategoriesViewController.swift | 2 ++ .../Search/Tabs/HistoryTab/SearchHistoryViewController.swift | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchCategoriesViewController.swift b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchCategoriesViewController.swift index 64c569526..3fc409e99 100644 --- a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchCategoriesViewController.swift +++ b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchCategoriesViewController.swift @@ -23,6 +23,8 @@ final class SearchCategoriesViewController: MWMTableViewController { tableView.setStyle(.background) tableView.register(cell: SearchCategoryCell.self) tableView.keyboardDismissMode = .onDrag + let footerHeight = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow?.safeAreaInsets.bottom ?? 1 + tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: footerHeight)) } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { diff --git a/iphone/Maps/UI/Search/Tabs/HistoryTab/SearchHistoryViewController.swift b/iphone/Maps/UI/Search/Tabs/HistoryTab/SearchHistoryViewController.swift index 7283376d0..325b20a8d 100644 --- a/iphone/Maps/UI/Search/Tabs/HistoryTab/SearchHistoryViewController.swift +++ b/iphone/Maps/UI/Search/Tabs/HistoryTab/SearchHistoryViewController.swift @@ -43,7 +43,8 @@ final class SearchHistoryViewController: MWMViewController { tableView.keyboardDismissMode = .onDrag tableView.delegate = self tableView.dataSource = self - tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: 1)) + let footerHeight = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow?.safeAreaInsets.bottom ?? 1 + tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: footerHeight)) view.addSubview(tableView) tableView.translatesAutoresizingMaskIntoConstraints = false