[ios] Stop overlap between last search results and home indicator

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-08-23 19:20:43 +02:00
committed by Yannik Bloscheck
parent c9de67762c
commit f84461bff8
2 changed files with 4 additions and 1 deletions

View File

@@ -23,6 +23,8 @@ final class SearchCategoriesViewController: MWMTableViewController {
tableView.setStyle(.background) tableView.setStyle(.background)
tableView.register(cell: SearchCategoryCell.self) tableView.register(cell: SearchCategoryCell.self)
tableView.keyboardDismissMode = .onDrag 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 { override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

View File

@@ -43,7 +43,8 @@ final class SearchHistoryViewController: MWMViewController {
tableView.keyboardDismissMode = .onDrag tableView.keyboardDismissMode = .onDrag
tableView.delegate = self tableView.delegate = self
tableView.dataSource = 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) view.addSubview(tableView)
tableView.translatesAutoresizingMaskIntoConstraints = false tableView.translatesAutoresizingMaskIntoConstraints = false