From c934cf14ef1e5e3744bd9f7176feb985e0700b16 Mon Sep 17 00:00:00 2001 From: Johyeon Yoon Date: Tue, 9 Apr 2024 11:27:21 +0900 Subject: [PATCH] =?UTF-8?q?DealiTextInput=20=EC=95=84=EC=9D=B4=EC=BD=98=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EC=A6=88=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/TextInputs/DealiTextInput.swift | 2 +- .../DealiDesignKit/Utils/Extensions/UIImage+Extension.swift | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/DealiDesignKit/Components/TextInputs/DealiTextInput.swift b/Sources/DealiDesignKit/Components/TextInputs/DealiTextInput.swift index 6fc1645c..1d5ae9f8 100644 --- a/Sources/DealiDesignKit/Components/TextInputs/DealiTextInput.swift +++ b/Sources/DealiDesignKit/Components/TextInputs/DealiTextInput.swift @@ -113,7 +113,7 @@ public final class DealiTextInput: UIView { self.inputStackView.addArrangedSubview(self.deleteButton) self.inputStackView.setCustomSpacing(-2.0, after: self.textField) self.deleteButton.then { - $0.setImage(UIImage.dealiIcon(named: "ic_x"), for: .normal) + $0.setImage(UIImage.dealiIcon(named: "ic_x")?.resize(CGSize(width: 16.0, height: 16.0)), for: .normal) $0.isHidden = true }.snp.makeConstraints { $0.size.equalTo(CGSize(width: 44.0, height: 44.0)) diff --git a/Sources/DealiDesignKit/Utils/Extensions/UIImage+Extension.swift b/Sources/DealiDesignKit/Utils/Extensions/UIImage+Extension.swift index 3d0a8287..c1d3005d 100644 --- a/Sources/DealiDesignKit/Utils/Extensions/UIImage+Extension.swift +++ b/Sources/DealiDesignKit/Utils/Extensions/UIImage+Extension.swift @@ -14,4 +14,10 @@ public extension UIImage { return image } + + func resize(_ size: CGSize) -> UIImage { + return UIGraphicsImageRenderer(size: size).image { _ in + draw(in: CGRect(origin: .zero, size: size)) + } + } }