Commit cf6e6249 authored by Steven杜宇's avatar Steven杜宇

// 搜索

parent fd233090
......@@ -45,19 +45,25 @@ class YHHomePageViewController: YHBaseViewController {
lazy var searchView: YHHomeSearchView = {
let view = YHHomeSearchView()
let tap = UITapGestureRecognizer(target: self, action: #selector(didSearchBarClicked))
view.addGestureRecognizer(tap)
return view
}()
lazy var homeHeaderView: YHHomeHeadView = {
let view = YHHomeHeadView()
return view
}()
@objc func didSearchBarClicked() {
let vc = YHSearchInfomationVC()
self.navigationController?.pushViewController(vc)
}
}
private extension YHHomePageViewController {
func setupUI() {
gk_navTitle = ""
gk_navigationBar.isHidden = true
view.backgroundColor = .white
view.addSubview(searchView)
......
......@@ -20,6 +20,7 @@ class YHSearchInfomationVC: YHBaseViewController {
lazy var searchHistoryView: YHSearchInfoHistoryView = {
let view = YHSearchInfoHistoryView(frame: CGRect(x: 0, y: searchBar.frame.maxY+8, width: KScreenWidth, height: KScreenHeight-searchBar.frame.maxY-8))
view.isHidden = true
view.selectBlock = {
[weak self] text in
guard let self = self else { return }
......
......@@ -198,12 +198,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row >= items.count) { return }
// if true {
// let vc = YHSearchInfomationVC()
// self.navigationController?.pushViewController(vc)
// return
// }
if !checkLogin() {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom
......
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