3D touch to search
This commit is contained in:
parent
563156b0a4
commit
97056ab91c
3 changed files with 36 additions and 0 deletions
|
|
@ -64,6 +64,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(PasswordsViewController.actOnPasswordUpdatedNotification), name: NSNotification.Name(rawValue: "passwordUpdated"), object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(PasswordsViewController.actOnPasswordStoreErasedNotification), name: NSNotification.Name(rawValue: "passwordStoreErased"), object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(PasswordsViewController.actOnSearchNotification), name: NSNotification.Name(rawValue: "search"), object: nil)
|
||||
|
||||
generateSections(item: passwordEntities!)
|
||||
tableView.delegate = self
|
||||
|
|
@ -196,6 +197,10 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
|
||||
reloadTableView(data: passwordEntities!)
|
||||
}
|
||||
|
||||
func actOnSearchNotification() {
|
||||
searchController.searchBar.becomeFirstResponder()
|
||||
}
|
||||
|
||||
|
||||
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue