From 55a2b3bc6ca87b96c516760259432c802b2ce90e Mon Sep 17 00:00:00 2001 From: LeeJoEun-01 Date: Sat, 2 Nov 2024 22:04:57 +0900 Subject: [PATCH] =?UTF-8?q?[#24]=20Radius=20=EB=8B=A8=EC=9C=84=20CGFloat?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Handy/Source/Atom/HandyButton/HandyBoxButton.swift | 4 ++-- .../Source/Atom/HandyButton/HandyTextButton.swift | 4 ++-- Handy/Handy/Source/Foundation/HandyPrimitive.swift | 10 +++++----- Handy/Handy/Source/Foundation/HandySematic.swift | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Handy/Handy/Source/Atom/HandyButton/HandyBoxButton.swift b/Handy/Handy/Source/Atom/HandyButton/HandyBoxButton.swift index 215c71c..356ab3e 100644 --- a/Handy/Handy/Source/Atom/HandyButton/HandyBoxButton.swift +++ b/Handy/Handy/Source/Atom/HandyButton/HandyBoxButton.swift @@ -119,7 +119,7 @@ public class HandyBoxButton: UIButton, HandyButtonProtocol { } } - fileprivate var rounding: Int { + fileprivate var rounding: CGFloat { switch self { case .xLarge, .large: return HandySemantic.radiusXL @@ -448,7 +448,7 @@ public class HandyBoxButton: UIButton, HandyButtonProtocol { 버튼의 라운딩 값을 세팅합니다. */ private func setBoxButtonRounding() { - self.layer.cornerRadius = CGFloat(size.rounding) + self.layer.cornerRadius = size.rounding } public override func layoutSubviews() { diff --git a/Handy/Handy/Source/Atom/HandyButton/HandyTextButton.swift b/Handy/Handy/Source/Atom/HandyButton/HandyTextButton.swift index e1f0a0b..b71b8bf 100644 --- a/Handy/Handy/Source/Atom/HandyButton/HandyTextButton.swift +++ b/Handy/Handy/Source/Atom/HandyButton/HandyTextButton.swift @@ -104,7 +104,7 @@ public class HandyTextButton: UIButton, HandyButtonProtocol { } } - fileprivate var rounding: Int { + fileprivate var rounding: CGFloat { switch self { case .medium, .small, .xSmall: return HandySemantic.radiusXS @@ -400,7 +400,7 @@ public class HandyTextButton: UIButton, HandyButtonProtocol { 버튼의 라운딩 값을 세팅합니다. */ private func setBoxButtonRounding() { - self.layer.cornerRadius = CGFloat(size.rounding) + self.layer.cornerRadius = size.rounding } public override func layoutSubviews() { diff --git a/Handy/Handy/Source/Foundation/HandyPrimitive.swift b/Handy/Handy/Source/Foundation/HandyPrimitive.swift index 4f20702..ac827b9 100644 --- a/Handy/Handy/Source/Foundation/HandyPrimitive.swift +++ b/Handy/Handy/Source/Foundation/HandyPrimitive.swift @@ -124,19 +124,19 @@ public enum HandyPrimitive { // MARK: - Spacing - public static var number8: Int { + public static var number8: CGFloat { return 8 } - public static var number10: Int { + public static var number10: CGFloat { return 10 } - public static var number12: Int { + public static var number12: CGFloat { return 12 } - public static var number14: Int { + public static var number14: CGFloat { return 14 } - public static var number16: Int { + public static var number16: CGFloat { return 16 } } diff --git a/Handy/Handy/Source/Foundation/HandySematic.swift b/Handy/Handy/Source/Foundation/HandySematic.swift index b59be5e..ecd9d95 100644 --- a/Handy/Handy/Source/Foundation/HandySematic.swift +++ b/Handy/Handy/Source/Foundation/HandySematic.swift @@ -247,23 +247,23 @@ public enum HandySemantic { // MARK: - Radius - public static var radiusXS: Int { + public static var radiusXS: CGFloat { return HandyPrimitive.number8 } - public static var radiusS: Int { + public static var radiusS: CGFloat { return HandyPrimitive.number10 } - public static var radiusM: Int { + public static var radiusM: CGFloat { return HandyPrimitive.number12 } - public static var radiusL: Int { + public static var radiusL: CGFloat { return HandyPrimitive.number14 } - public static var radiusXL: Int { + public static var radiusXL: CGFloat { return HandyPrimitive.number16 }