Fix the search bar becoming first reponder issue in macOS
This commit is contained in:
parent
4904b81da0
commit
6bc066dc73
1 changed files with 2 additions and 2 deletions
|
|
@ -112,9 +112,9 @@ class PasswordNavigationViewController: UIViewController {
|
||||||
|
|
||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
if searchText != nil {
|
if let text = searchText, !text.isEmpty {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.searchBar.text = self.searchText
|
self.searchBar.text = text
|
||||||
self.searchController.isActive = true
|
self.searchController.isActive = true
|
||||||
self.searchBar.becomeFirstResponder()
|
self.searchBar.becomeFirstResponder()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue