From 24c6a6e75072957acb83d0f058c090bb00a1cab2 Mon Sep 17 00:00:00 2001 From: hyun99999 Date: Mon, 20 Feb 2023 09:16:27 +0900 Subject: [PATCH] =?UTF-8?q?add:=20UIColor+Extension=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20(#372)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 명함 만들기 버튼 배경 색의 평소와 선택시 컬러를 다크모드 대응하여 추가함 --- .../Extensions/UIColor+Extension.swift | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift index d8ae07f1..edd1c831 100644 --- a/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift @@ -162,6 +162,34 @@ extension UIColor { } } + @nonobjc class var cardCreationUnclicked: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 64.0 / 255.0, green: 70 / 255.0, blue: 79 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var cardCreationClicked: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 202.0 / 255.0, green: 209 / 255.0, blue: 215.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 45.0 / 255.0, green: 49 / 255.0, blue: 55 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0) + } + } + @nonobjc class var harmonyRed: UIColor { return UIColor(red: 239.0 / 255.0, green: 115.0 / 255.0, blue: 115.0 / 255.0, alpha: 1.0) }