ソースを参照

自定义弹框空白点击隐藏

huzhiqiang 3 年 前
コミット
f3897952e6

+ 1 - 0
BFFramework/Classes/PQGPUImage/Source/Color.swift

@@ -13,6 +13,7 @@ public struct Color {
 
     public static let black = Color(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
     public static let white = Color(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+    public static let gray  = Color(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
     public static let red = Color(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)
     public static let green = Color(red: 0.0, green: 1.0, blue: 0.0, alpha: 1.0)
     public static let blue = Color(red: 0.0, green: 0.0, blue: 1.0, alpha: 1.0)

+ 9 - 0
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -367,6 +367,15 @@ class PQStuckPointEditerController: PQBaseViewController {
         return speedSettingView
 
     }()
+    
+    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
+        super.touchesBegan(touches, with: event)
+        if touches.first?.view != self.customSpeedSettingView {
+            if !customSpeedSettingView.isHidden {
+                customSpeedSettingView.isHidden = true
+            }
+        }
+    }
 
     // 自定义速度
     lazy var customSpeedSettingView: PQCustomSpeedSettingView = {