Skip to content

Commit ba3156b

Browse files
committed
[#198] ReviewSummaryView 레이아웃 적용 완료
background 적용
1 parent 2fd8bb9 commit ba3156b

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

EATSSU/App/Sources/Presentation/Review/MainReviewView/Component/ChartComponentView.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ final class ChartComponentView: BaseUIView {
5252
chartBarView.snp.makeConstraints { make in
5353
make.width.equalTo(115.adjusted)
5454
make.height.equalTo(10.adjusted)
55-
5655
}
5756
chartBarforegroundView.snp.makeConstraints { make in
5857
make.width.equalTo(80.adjusted)
@@ -63,7 +62,7 @@ final class ChartComponentView: BaseUIView {
6362
make.edges.equalToSuperview()
6463
}
6564
chartComponentStackView.snp.makeConstraints { make in
66-
make.top.leading.bottom.equalToSuperview()
65+
make.edges.equalToSuperview()
6766
}
6867
}
6968
}

EATSSU/App/Sources/Presentation/Review/MainReviewView/Component/ReviewSummaryView.swift

+8-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ final class ReviewSummaryView: BaseUIView {
3131
private lazy var thumbCountStackView: UIStackView = {
3232
let stackView = UIStackView(arrangedSubviews: [thumbupCountView, thumbdownpCountView])
3333
stackView.axis = .horizontal
34-
stackView.distribution = .fillEqually
3534
stackView.spacing = 14
3635
stackView.backgroundColor = .purple
3736
return stackView
@@ -40,7 +39,8 @@ final class ReviewSummaryView: BaseUIView {
4039
private lazy var ratingSummaryStackView: UIStackView = {
4140
let stackView = UIStackView(arrangedSubviews: [starRatingView, thumbCountStackView])
4241
stackView.axis = .vertical
43-
stackView.spacing = 20
42+
stackView.alignment = .center
43+
stackView.spacing = 15
4444
stackView.backgroundColor = .gray300
4545
return stackView
4646
}()
@@ -51,7 +51,8 @@ final class ReviewSummaryView: BaseUIView {
5151
let label = UILabel()
5252
label.text = "총 리뷰 수"
5353
label.font = .caption2
54-
label.textColor = .black
54+
label.backgroundColor = .red
55+
label.setContentHuggingPriority(.defaultHigh, for: .horizontal)
5556
return label
5657
}()
5758

@@ -103,7 +104,6 @@ final class ReviewSummaryView: BaseUIView {
103104
let stackView = UIStackView(arrangedSubviews: [ratingSummaryStackView,
104105
reviewDistributionStackView])
105106
stackView.axis = .horizontal
106-
// stackView.spacing = 44
107107
stackView.backgroundColor = .brown
108108
return stackView
109109
}()
@@ -114,6 +114,7 @@ final class ReviewSummaryView: BaseUIView {
114114
let stackView = UIStackView(arrangedSubviews: [menuLabel, ratingAndDistributionStackView])
115115
stackView.axis = .vertical
116116
stackView.spacing = 15
117+
stackView.alignment = .center
117118
stackView.backgroundColor = .orange
118119
return stackView
119120
}()
@@ -130,6 +131,9 @@ final class ReviewSummaryView: BaseUIView {
130131
make.horizontalEdges.equalToSuperview().inset(20.adjusted)
131132
make.bottom.equalToSuperview()
132133
}
134+
starRatingView.snp.makeConstraints { make in
135+
make.top.equalToSuperview().offset(20.adjusted)
136+
}
133137
}
134138
}
135139

EATSSU/App/Sources/Presentation/Review/MainReviewView/Component/StarRatingView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ final class StarRatingView: BaseUIView {
2222

2323
private lazy var ratingLabel: UILabel = {
2424
let label = UILabel()
25-
label.text = "5"
26-
label.font = EATSSUDesignFontFamily.Pretendard.medium.font(size: 40)
25+
label.text = "5.0"
26+
label.font = EATSSUDesignFontFamily.Pretendard.medium.font(size: 35)
2727
return label
2828
}()
2929

@@ -53,8 +53,8 @@ final class StarRatingView: BaseUIView {
5353

5454
override func setLayout() {
5555
starImageView.snp.makeConstraints {
56-
$0.height.equalTo(24.adjusted)
57-
$0.width.equalTo(24.adjusted)
56+
$0.height.equalTo(25.adjusted)
57+
$0.width.equalTo(25.adjusted)
5858
}
5959

6060
starRatingStackView.snp.makeConstraints {

0 commit comments

Comments
 (0)