Commit 9ce015e2 authored by lujunye's avatar lujunye

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

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