fix a bug in UI in lanscape mode

This commit is contained in:
Bob Sun 2017-02-07 13:23:18 +08:00
parent 82c0c9c203
commit e6b9bb7afb
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -76,6 +76,12 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
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()
}
func numberOfSections(in tableView: UITableView) -> Int {
return sections.count
}