             view.addSubview(searchBarView!)
         }
         navigationItem.title = "PasswordStore".localize()
+        tapNavigationBarGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapNavigationBar))
+
         tableView.refreshControl = syncControl
         SVProgressHUD.setDefaultMaskType(.black)
         tableView.register(UINib(nibName: "PasswordWithFolderTableViewCell", bundle: nil), forCellReuseIdentifier: "passwordWithFolderTableViewCell")

        SharedDefaults[.searchDefault] = SearchBarScope(rawValue: selectedScope)
        updateSearchResults(for: searchController)
    }


    func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
        // set the default search scope to "all"

    private let keychain = AppKeychain.shared

    private var tapTabBarTime: TimeInterval = 0
    private var tapNavigationBarGestureRecognizer: UITapGestureRecognizer!

    private var sections = [(title: String, entries: [PasswordsTableEntry])]()

    private var searchActive : Bool = false
    private enum PasswordLabel {
        case all
        case unsynced
    }

    private lazy var searchController: UISearchController = {
        let uiSearchController = UISearchController(searchResultsController: nil)
