Commit 820252e1 authored by pete谢兆麟's avatar pete谢兆麟

解决跳转搜索页抖动问题

parent f548fb00
......@@ -156,7 +156,6 @@ class YHSearchInfomationVC: YHBaseViewController {
view.addSubview(searchBar)
view.addSubview(tableView)
view.addSubview(searchHistoryView)
searchBar.textField.becomeFirstResponder()
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
......@@ -304,6 +303,13 @@ class YHSearchInfomationVC: YHBaseViewController {
@objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if items.count == 0 {
searchBar.textField.becomeFirstResponder()
}
}
}
extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment