Ver código fonte

首页左上角点击区域

Chris 6 anos atrás
pai
commit
3a1ac1a13d

+ 9 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/MainView/ShoppingMallNavigationBarView.swift

@@ -83,6 +83,9 @@ class ShoppingMallNavigationBarView: BaseView {
         addressLabel.text = LocationModel.shared().getLocationModel()?.city ?? "西安市"
         addressLabel.textColor = k999999Color
         addressLabel.font = kScaleRegularFont14
+        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapGesClick(tap:)))
+        addressLabel.isUserInteractionEnabled = true
+        addressLabel.addGestureRecognizer(tapGesture)
         return addressLabel
     }()
     
@@ -124,4 +127,10 @@ class ShoppingMallNavigationBarView: BaseView {
         return categoryButton
     }()
     
+    @objc func tapGesClick(tap: UITapGestureRecognizer) {
+        if let selfAddrTipClosure = self.selfAddrTipClosure {
+            selfAddrTipClosure()
+        }
+    }
+    
 }