Make searchController lazy
This commit is contained in:
parent
94f7fba8bd
commit
598f89ff60
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ class PasswordsViewController: UIViewController {
|
||||||
var dataSource: PasswordsTableDataSource!
|
var dataSource: PasswordsTableDataSource!
|
||||||
weak var selectionDelegate: PasswordSelectionDelegate?
|
weak var selectionDelegate: PasswordSelectionDelegate?
|
||||||
|
|
||||||
var searchController: UISearchController {
|
lazy var searchController: UISearchController = {
|
||||||
let uiSearchController = UISearchController(searchResultsController: nil)
|
let uiSearchController = UISearchController(searchResultsController: nil)
|
||||||
uiSearchController.searchBar.isTranslucent = true
|
uiSearchController.searchBar.isTranslucent = true
|
||||||
uiSearchController.obscuresBackgroundDuringPresentation = false
|
uiSearchController.obscuresBackgroundDuringPresentation = false
|
||||||
|
|
@ -25,7 +25,7 @@ class PasswordsViewController: UIViewController {
|
||||||
uiSearchController.searchBar.searchTextField.clearButtonMode = .whileEditing
|
uiSearchController.searchBar.searchTextField.clearButtonMode = .whileEditing
|
||||||
}
|
}
|
||||||
return uiSearchController
|
return uiSearchController
|
||||||
}
|
}()
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue