Commit 9ce015e2 authored by lujunye's avatar lujunye

是大连科技sad;立刻就撒旦法;拉水电费

parent 248d5f38
...@@ -138,9 +138,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -138,9 +138,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
func clearSearchAction() { func clearSearchAction() {
print("清楚搜索文字") print("清楚搜索文字")
} }
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--") func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
searchBar.resignFirstResponder()
let request = AMapPOIKeywordsSearchRequest() let request = AMapPOIKeywordsSearchRequest()
request.keywords = searchBar.text request.keywords = searchBar.text
request.requireExtension = true request.requireExtension = true
...@@ -148,6 +147,12 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -148,6 +147,12 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
request.requireSubPOIs = true request.requireSubPOIs = true
search.aMapPOIKeywordsSearch(request) search.aMapPOIKeywordsSearch(request)
} }
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
}
@objc func cancelKeyboard(){ @objc func cancelKeyboard(){
IQKeyboardManager.shared.resignFirstResponder() IQKeyboardManager.shared.resignFirstResponder()
} }
......
...@@ -120,54 +120,57 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView ...@@ -120,54 +120,57 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
bgBtn = nil bgBtn = nil
} }
@IBAction func adr_select_action(_ sender: UIButton) { @IBAction func adr_select_action(_ sender: UIButton) {
if bgBtn == nil { let vc = SJMapViewController()
let btn = UIButton() vc.delegate = self
self.view.addSubview(btn) self.navigationController?.pushViewController(vc, animated: true)
btn.backgroundColor = UIColor.black // if bgBtn == nil {
btn.alpha = 0.4 // let btn = UIButton()
btn.addTarget(self, action: #selector(closeAction(sender:)), for: .touchUpInside) // self.view.addSubview(btn)
btn.snp.makeConstraints { (make) in // btn.backgroundColor = UIColor.black
make.top.right.bottom.left.equalTo(0) // btn.alpha = 0.4
} // btn.addTarget(self, action: #selector(closeAction(sender:)), for: .touchUpInside)
bgBtn = btn // btn.snp.makeConstraints { (make) in
} // make.top.right.bottom.left.equalTo(0)
if btmView == nil { // }
let view = UIView() // bgBtn = btn
view.backgroundColor = UIColor.white // }
btmView = view // if btmView == nil {
self.view.addSubview(btmView!) // let view = UIView()
btmView!.snp.makeConstraints { (make) in // view.backgroundColor = UIColor.white
make.left.bottom.right.equalTo(0) // btmView = view
make.height.equalTo(230) // self.view.addSubview(btmView!)
} // btmView!.snp.makeConstraints { (make) in
showAreaSelect(view:btmView!) // make.left.bottom.right.equalTo(0)
// make.height.equalTo(230)
let rightBtn = UIButton() // }
rightBtn.setTitle("确定", for: .normal) // showAreaSelect(view:btmView!)
rightBtn.setTitleColor(UIColor(named: "蓝色字体颜色"), for: .normal) //
rightBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15) // let rightBtn = UIButton()
rightBtn.addTarget(self, action: #selector(adrSelectFinish(sender:)), for: .touchUpInside) // rightBtn.setTitle("确定", for: .normal)
btmView?.addSubview(rightBtn) // rightBtn.setTitleColor(UIColor(named: "蓝色字体颜色"), for: .normal)
rightBtn.snp.makeConstraints { (make) in // rightBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15)
make.right.equalTo(-15) // rightBtn.addTarget(self, action: #selector(adrSelectFinish(sender:)), for: .touchUpInside)
make.top.equalTo(0) // btmView?.addSubview(rightBtn)
make.height.equalTo(30) // rightBtn.snp.makeConstraints { (make) in
make.width.equalTo(50) // make.right.equalTo(-15)
} // make.top.equalTo(0)
// make.height.equalTo(30)
let leftBtn = UIButton() // make.width.equalTo(50)
leftBtn.setTitle("取消", for: .normal) // }
leftBtn.setTitleColor(UIColor(named: "多选按钮字体颜色"), for: .normal) //
leftBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15) // let leftBtn = UIButton()
leftBtn.addTarget(self, action: #selector(closeAction(sender:)), for: .touchUpInside) // leftBtn.setTitle("取消", for: .normal)
btmView?.addSubview(leftBtn) // leftBtn.setTitleColor(UIColor(named: "多选按钮字体颜色"), for: .normal)
leftBtn.snp.makeConstraints { (make) in // leftBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15)
make.left.equalTo(15) // leftBtn.addTarget(self, action: #selector(closeAction(sender:)), for: .touchUpInside)
make.top.equalTo(0) // btmView?.addSubview(leftBtn)
make.height.equalTo(30) // leftBtn.snp.makeConstraints { (make) in
make.width.equalTo(50) // make.left.equalTo(15)
} // make.top.equalTo(0)
} // make.height.equalTo(30)
// make.width.equalTo(50)
// }
// }
} }
@IBOutlet weak var city_lbl: UILabel! @IBOutlet weak var city_lbl: UILabel!
......
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