From c5e51c0ec3cbf1016f3bfbd58b0f0a004aaa9900 Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期二, 18 二月 2025 17:58:45 +0800 Subject: [PATCH] fix --- XQMuse/Config/Def.swift | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/XQMuse/Config/Def.swift b/XQMuse/Config/Def.swift index b48a5f5..1dc8eff 100644 --- a/XQMuse/Config/Def.swift +++ b/XQMuse/Config/Def.swift @@ -101,9 +101,9 @@ } extension UIButton { - func localGradientColor(cornerRadius:Double,bounds:CGRect? = nil){ + func localGradientColor(cornerRadius:Double,bounds:CGRect? = nil,clear:Bool = false){ self.layer.sublayers?.removeAll(where: {$0 is CAGradientLayer}) - self.jq_gradientColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: cornerRadius, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 1, y: 0), bounds: bounds) + self.jq_gradientColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: cornerRadius, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 1, y: 0), bounds: bounds,clear: clear) } public func openCountDown(_ t:Int = 59,defultTitle:String = "获取验证码"){ @@ -152,5 +152,10 @@ } } - - +let isSimulator: Bool = { +#if targetEnvironment(simulator) + return true +#else + return false +#endif +}() -- Gitblit v1.7.1