From fab518e753164fd1b41b47cf44ea3c7c20dda463 Mon Sep 17 00:00:00 2001 From: JinUng41 Date: Sun, 1 Sep 2024 13:45:11 +0900 Subject: [PATCH] =?UTF-8?q?fix/#353=20'=EB=AA=A8=EC=9E=84=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9D=BC=20|=20=EB=82=A0=EC=A7=9C'=20=EA=B0=84?= =?UTF-8?q?=EA=B2=A9=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20divider=20?= =?UTF-8?q?=EB=AA=A8=EC=96=91=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 중간에 표현되는 divider를 UILabel로 구현 --- .../View/MeetingInfoBannerView.swift | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/KkuMulKum/Source/MeetingInfo/View/MeetingInfoBannerView.swift b/KkuMulKum/Source/MeetingInfo/View/MeetingInfoBannerView.swift index 529c2b7f..0a90792b 100644 --- a/KkuMulKum/Source/MeetingInfo/View/MeetingInfoBannerView.swift +++ b/KkuMulKum/Source/MeetingInfo/View/MeetingInfoBannerView.swift @@ -15,7 +15,9 @@ final class MeetingInfoBannerView: BaseView { $0.setText("모임 생성일", style: .label01, color: .gray4) } - private let divider = UIView(backgroundColor: .gray4) + private let divider = UILabel().then { + $0.setText("l", style: .label01, color: .gray4) + } private let createdAtLabel = UILabel().then { $0.setText("2024.06.01", style: .label01, color: .gray4) @@ -40,24 +42,29 @@ final class MeetingInfoBannerView: BaseView { backgroundColor = .lightGreen layer.cornerRadius = 8 - horizontalStackView.addArrangedSubviews(explanationLabel, divider, createdAtLabel) - backgroundImageView.addSubviews(horizontalStackView, metCountLabel) + backgroundImageView.addSubviews(explanationLabel, divider, createdAtLabel, metCountLabel) addSubviews(backgroundImageView) } override func setupAutoLayout() { + explanationLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(20) + $0.leading.equalToSuperview().offset(16) + } + divider.snp.makeConstraints { - $0.width.equalTo(1) + $0.leading.equalTo(explanationLabel.snp.trailing).offset(12) + $0.centerY.equalTo(explanationLabel) } - horizontalStackView.snp.makeConstraints { - $0.top.equalToSuperview().offset(20) - $0.leading.equalToSuperview().offset(16) + createdAtLabel.snp.makeConstraints { + $0.leading.equalTo(divider.snp.trailing).offset(12) + $0.centerY.equalTo(explanationLabel) } metCountLabel.snp.makeConstraints { - $0.top.equalTo(horizontalStackView.snp.bottom).offset(2) - $0.leading.equalTo(horizontalStackView) + $0.top.equalTo(explanationLabel.snp.bottom).offset(2) + $0.leading.equalTo(explanationLabel) $0.bottom.equalToSuperview().offset(-20) }