Call shouldPerformSegue before performSegue
Because performSegue will not automatically call shouldPerformSegue as segue in Storyboard.
This commit is contained in:
parent
480388f33c
commit
89b3924b7a
1 changed files with 5 additions and 1 deletions
|
|
@ -238,7 +238,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
let entry = getPasswordEntry(by: indexPath)
|
||||
if !entry.isDir {
|
||||
performSegue(withIdentifier: "showPasswordDetail", sender: tableView.cellForRow(at: indexPath))
|
||||
let segueIdentifier = "showPasswordDetail"
|
||||
let sender = tableView.cellForRow(at: indexPath)
|
||||
if shouldPerformSegue(withIdentifier: segueIdentifier, sender: sender) {
|
||||
performSegue(withIdentifier: segueIdentifier, sender: sender)
|
||||
}
|
||||
} else {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
searchController.isActive = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue