Skip to content

Commit

Permalink
fix/#353 '모임 생성일 | 날짜' 간격 수정 및 divider 모양 변경
Browse files Browse the repository at this point in the history
- 중간에 표현되는 divider를 UILabel로 구현
  • Loading branch information
JinUng41 committed Sep 1, 2024
1 parent 2a4ab19 commit fab518e
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions KkuMulKum/Source/MeetingInfo/View/MeetingInfoBannerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}

Expand Down

0 comments on commit fab518e

Please sign in to comment.