From 299de27970ebfff53270707cd32e25ff1723df43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Wed, 25 Oct 2023 14:44:32 +0900 Subject: [PATCH] =?UTF-8?q?Refactor=20[#269]=20BaseView=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Profile/Main/View/CountCustomView.swift | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/View/CountCustomView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/View/CountCustomView.swift index 3f16680d..b911d040 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/View/CountCustomView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/View/CountCustomView.swift @@ -10,36 +10,15 @@ import UIKit import SnapKit import Then -final class CountCustomView: UIView { +final class CountCustomView: BaseView { // MARK: - Variables // MARK: Component var countLabel = UILabel() var titleLabel = UILabel() - // MARK: - Function - // MARK: LifeCycle - override init(frame: CGRect) { - super.init(frame: frame) - setUI() - } - - @available(*, unavailable) - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } -} - -// MARK: - extension -extension CountCustomView { - // MARK: Layout Helpers - private func setUI() { - setStyle() - setLayout() - } - - private func setStyle() { + override func setStyle() { countLabel.do { $0.setTextWithLineHeight(text: "0", lineHeight: 30.adjustedHeight) $0.font = .uiHeadline02 @@ -51,10 +30,9 @@ extension CountCustomView { $0.font = .uiLabelMedium $0.textColor = .grayscales500 } - } - private func setLayout() { + override func setLayout() { self.addSubviews(countLabel, titleLabel)