From 3e8046eb29d4c6377300b2924be29e9cf5f60b64 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Sun, 14 Jan 2018 22:35:21 -0800 Subject: [PATCH] Fix UI bug: #152 --- pass/Controllers/PasswordsViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pass/Controllers/PasswordsViewController.swift b/pass/Controllers/PasswordsViewController.swift index c4e18c8..fe51731 100644 --- a/pass/Controllers/PasswordsViewController.swift +++ b/pass/Controllers/PasswordsViewController.swift @@ -49,7 +49,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV }() private lazy var searchBarView: UIView? = { guard #available(iOS 11, *) else { - let uiView = UIView(frame: CGRect(x: 0, y: 64, width: self.view.bounds.width, height: 56)) + let uiView = UIView(frame: CGRect(x: 0, y: 64, width: self.view.bounds.width, height: 44)) uiView.addSubview(self.searchController.searchBar) return uiView } @@ -215,7 +215,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV navigationItem.hidesSearchBarWhenScrolling = false } else { // Fallback on earlier versions - tableView.contentInset = UIEdgeInsetsMake(56, 0, 0, 0) + tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0) view.addSubview(searchBarView!) } tableView.refreshControl = syncControl @@ -242,7 +242,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() guard #available(iOS 11, *) else { - searchBarView?.frame = CGRect(x: 0, y: navigationController!.navigationBar.bounds.size.height + UIApplication.shared.statusBarFrame.height, width: UIScreen.main.bounds.width, height: 56) + searchBarView?.frame = CGRect(x: 0, y: navigationController!.navigationBar.bounds.size.height + UIApplication.shared.statusBarFrame.height, width: UIScreen.main.bounds.width, height: 44) searchController.searchBar.sizeToFit() return }