Instance selector tweaks

Closes #234
Closes #237
This commit is contained in:
Shadowfacts 2022-11-10 17:02:08 -05:00
parent 10aa32d9cc
commit d8bf770902
2 changed files with 5 additions and 2 deletions

View File

@ -28,8 +28,6 @@ class FindInstanceViewController: InstanceSelectorTableViewController {
super.viewDidLoad()
delegate = self
searchController.hidesNavigationBarDuringPresentation = false
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelButtonPressed))
}

View File

@ -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, *) {