From d8bf770902466e34f375ae67d8a57694a96297c9 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 10 Nov 2022 17:02:08 -0500 Subject: [PATCH] Instance selector tweaks Closes #234 Closes #237 --- Tusker/Screens/FindInstanceViewController.swift | 2 -- .../Onboarding/InstanceSelectorTableViewController.swift | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/FindInstanceViewController.swift b/Tusker/Screens/FindInstanceViewController.swift index f49a2c45..b58ea99e 100644 --- a/Tusker/Screens/FindInstanceViewController.swift +++ b/Tusker/Screens/FindInstanceViewController.swift @@ -28,8 +28,6 @@ class FindInstanceViewController: InstanceSelectorTableViewController { super.viewDidLoad() delegate = self - - searchController.hidesNavigationBarDuringPresentation = false navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelButtonPressed)) } diff --git a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift index f27f05a8..a551b756 100644 --- a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift +++ b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift @@ -63,6 +63,7 @@ class InstanceSelectorTableViewController: UITableViewController { appearance.configureWithDefaultBackground() navigationItem.scrollEdgeAppearance = appearance + tableView.keyboardDismissMode = .interactive tableView.register(UINib(nibName: "InstanceTableViewCell", bundle: .main), forCellReuseIdentifier: instanceCell) tableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = 120 @@ -84,7 +85,11 @@ class InstanceSelectorTableViewController: UITableViewController { searchController = UISearchController(searchResultsController: nil) searchController.searchResultsUpdater = self searchController.obscuresBackgroundDuringPresentation = false + searchController.hidesNavigationBarDuringPresentation = false searchController.searchBar.searchTextField.autocapitalizationType = .none + searchController.searchBar.searchTextField.keyboardType = .URL + searchController.searchBar.showsCancelButton = false + searchController.searchBar.placeholder = "Search or enter a URL" navigationItem.searchController = searchController navigationItem.hidesSearchBarWhenScrolling = false if #available(iOS 16.0, *) {