From c79624caf0ce4a5caf5f1d40eccb1dd564f52f6b Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Thu, 2 Mar 2017 15:57:39 +0800 Subject: [PATCH] Directory entry cannot be long pressed --- pass/Controllers/PasswordsViewController.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pass/Controllers/PasswordsViewController.swift b/pass/Controllers/PasswordsViewController.swift index aa5629f..d86aebb 100644 --- a/pass/Controllers/PasswordsViewController.swift +++ b/pass/Controllers/PasswordsViewController.swift @@ -174,12 +174,13 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV } else { cell.textLabel?.text = "↻ \(entry.title)" } + + let longPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longPressAction(_:))) + longPressGestureRecognizer.minimumPressDuration = 0.6 + cell.addGestureRecognizer(longPressGestureRecognizer) } else { cell.textLabel?.text = "\(entry.title)/" } - let longPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longPressAction(_:))) - longPressGestureRecognizer.minimumPressDuration = 0.6 - cell.addGestureRecognizer(longPressGestureRecognizer) return cell }