From 83940051a085429ed8c8ded509fddb4b2bb019b3 Mon Sep 17 00:00:00 2001 From: Hamp Date: Wed, 28 Aug 2024 10:29:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:zap:=20::=20SingleActionButtonView=20Blur?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/SingleActionButtonView.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift b/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift index 6ae2c1022..a140f2800 100644 --- a/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift +++ b/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift @@ -14,6 +14,12 @@ public final class SingleActionButtonView: UIView { $0.backgroundColor = .white.withAlphaComponent(0.4) } + + private let translucentView = UIVisualEffectView(effect: UIBlurEffect(style: .regular)).then { + $0.layer.cornerRadius = 8 + $0.clipsToBounds = true + } + private let imageView = UIImageView().then { $0.contentMode = .scaleAspectFit } @@ -34,7 +40,7 @@ public final class SingleActionButtonView: UIView { public init(frame: CGRect, topSpacing: CGFloat = 16) { self.topSpacing = topSpacing super.init(frame: frame) - backgroundColor = DesignSystemAsset.BlueGrayColor.gray100.color + backgroundColor = .clear addView() setLayout() addAction() @@ -66,6 +72,7 @@ private extension SingleActionButtonView { } func addView() { + addSubview(translucentView) addSubview(baseView) addSubview(imageView) addSubview(label) @@ -92,5 +99,9 @@ private extension SingleActionButtonView { label.snp.makeConstraints { $0.center.equalTo(button.snp.center) } + + translucentView.snp.makeConstraints { + $0.edges.equalTo(baseView) + } } } From 61151d5cbe00cb944797772b16f4460b07741a39 Mon Sep 17 00:00:00 2001 From: yongbeomkwak Date: Wed, 28 Aug 2024 10:29:36 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Fo?= =?UTF-8?q?rmatting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignSystem/Sources/SingleActionButtonView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift b/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift index a140f2800..6e1aeed11 100644 --- a/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift +++ b/Projects/UsertInterfaces/DesignSystem/Sources/SingleActionButtonView.swift @@ -14,10 +14,9 @@ public final class SingleActionButtonView: UIView { $0.backgroundColor = .white.withAlphaComponent(0.4) } - private let translucentView = UIVisualEffectView(effect: UIBlurEffect(style: .regular)).then { $0.layer.cornerRadius = 8 - $0.clipsToBounds = true + $0.clipsToBounds = true } private let imageView = UIImageView().then { @@ -99,7 +98,7 @@ private extension SingleActionButtonView { label.snp.makeConstraints { $0.center.equalTo(button.snp.center) } - + translucentView.snp.makeConstraints { $0.edges.equalTo(baseView) }