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