Skip to content

Commit

Permalink
[Feat] #6 - 기본 글씨 크기 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yurim830 committed Oct 24, 2024
1 parent ee0dcb3 commit abe707f
Show file tree
Hide file tree
Showing 6 changed files with 796 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,18 @@ class AppDetailView: UIView {
private let feedbackBoxView = UIView()
private let feedbackTitleLabel = ContentLabel()
private let feedbackStarStackView = StarStackView()
private let feedbackDateLabel = SubtitleLabel()
private let feedbackAuthorDateLabel = SubtitleLabel()
private let feedbackAuthorLabel = SubtitleLabel()
private let feedbackContentLabel = ContentLabel()
private let feedbackDeveloperTitleLabel = ContentLabel()
private let feedbackDeveloperContentLabel = ContentLabel()
private let feedbackDeveloperDateLabel = SubtitleLabel()
private let feedbackMoreButton1 = UIButton()
private let feedbackMoreButton2 = UIButton()

private let feedbackWriteButton = UIButton()
private let appSupportButton = UIButton()

// MARK: - Methods
override init(frame: CGRect) {
super.init(frame: frame)
Expand Down Expand Up @@ -130,7 +134,7 @@ class AppDetailView: UIView {
iconImageView.layer.borderColor = UIColor.systemGray5.cgColor
iconImageView.layer.borderWidth = 1

titleLabel.text = "토스"
titleLabel.configureLabel(size: 23, weight: .semibold, text: "토스")

subtitleLabel.text = "금융이 쉬워진다"

Expand All @@ -141,8 +145,8 @@ class AppDetailView: UIView {
foregroundColor: .white,
backgroundColor: .tintColor)

shareButton.configureButton(image: UIImage(systemName: "square.and.arrow.up"),
symbolWeight: .semibold)
shareButton.configureButton(systemName: "square.and.arrow.up",
symbolWeight: .medium)

}

Expand Down Expand Up @@ -205,8 +209,7 @@ class AppDetailView: UIView {
previewImageView.layer.borderColor = UIColor.systemGray5.cgColor
previewImageView.layer.borderWidth = 1

let symbolConfig = UIImage.SymbolConfiguration(weight: .regular)
previewDeviceImageView.image = UIImage(systemName: "iphone", withConfiguration: symbolConfig)?.withTintColor(.secondaryLabel)
previewDeviceImageView.image = UIImage.configureImage(systemName: "iphone", symbolWeight: .regular)?.withTintColor(.secondaryLabel)
previewDeviceImageView.contentMode = .scaleAspectFit

previewDeviceLabel.configureLabel(color: .secondaryLabel, size: 14, weight: .semibold, text: "iPhone")
Expand Down Expand Up @@ -244,7 +247,7 @@ class AppDetailView: UIView {
private func setFeedbackSummaryViewUI() {
feedbackSummaryTitleLabel.text = "평가 및 리뷰"

feedbackSummaryAverageLabel.configureLabel(color: .label, size: 68, weight: .bold, text: "4.4")
feedbackSummaryAverageLabel.configureLabel(color: .label, size: 64, weight: .bold, text: "4.4")

feedbackSummarySubtitleLabel.configureLabel(color: .secondaryLabel, size: 17, weight: .bold, text: "5점 만점")

Expand All @@ -258,28 +261,41 @@ class AppDetailView: UIView {

private func setFeedbackViewUI() {
feedbackTapToRateStackView.axis = .horizontal
feedbackTapToRateStackView.spacing = 10

feedbackTapToRateLabel.text = "탭하여 평가하기:"
feedbackTapToRateLabel.configureLabel(color: .secondaryLabel, size: 18, weight: .light, text: "탭하여 평가하기:")
feedbackTapToRateLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)

feedbackTapToRateStarStackView.setContentHuggingPriority(.defaultLow, for: .horizontal)

feedbackBoxView.backgroundColor = UIColor(named: "reviewbox")
feedbackTitleLabel.text = "김유림"
feedbackStarStackView.bind(2, .yellow)
feedbackDateLabel.text = "24.10.25"
feedbackAuthorLabel.text = "ISTJ"
feedbackContentLabel.text = """
"1. 동해물과 백두산이 마르고 닳도록
하느님이 보우하사 우리나라 만세
무궁화 삼천리 화려 강산
대한 사람 대한으로 길이 보전하세
"""
feedbackDeveloperTitleLabel.text = "개발자 답변"
feedbackBoxView.backgroundColor = .systemGray6
feedbackBoxView.layer.cornerRadius = 10

feedbackTitleLabel.configureLabel(size: 18, weight: .semibold, text: "김유림")

feedbackStarStackView.bind(2, .orange)

feedbackAuthorDateLabel.configureLabel(color: .secondaryLabel, size: 17, weight: .regular, text: "10월 25")

feedbackAuthorLabel.configureLabel(color: .secondaryLabel, size: 17, weight: .regular, text: "ISTJ")

feedbackContentLabel.text = "1. 동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세 무궁화 삼천리 화려 강산 대한 사람 대한으로 길이 보전하세"
feedbackContentLabel.setLineSpacing(4)

feedbackDeveloperTitleLabel.configureLabel(size: 17, weight: .medium, text: "개발자 답변")

feedbackDeveloperContentLabel.text = "안녕하세요, 감사합니다."
feedbackDeveloperContentLabel.setLineSpacing(4)

feedbackDeveloperDateLabel.configureLabel(color: .secondaryLabel, size: 17, weight: .regular, text: "10월 25")

[feedbackMoreButton1, feedbackMoreButton2].forEach {
$0.configureButton(title: "더 보기", removeContentInsets: true)
}

feedbackWriteButton.configureButton(title: " 리뷰 작성", systemName: "square.and.pencil")

appSupportButton.configureButton(title: " 앱 지원", systemName: "questionmark.circle")
}

// MARK: - Hierarchy
Expand Down Expand Up @@ -362,15 +378,15 @@ class AppDetailView: UIView {
}

private func setFeedbackViewHierarchy() {
[feedbackTapToRateStackView, feedbackBoxView].forEach {
[feedbackTapToRateStackView, feedbackBoxView, feedbackWriteButton, appSupportButton].forEach {
feedbackView.addSubview($0)
}

[feedbackTapToRateLabel, feedbackTapToRateStarStackView].forEach {
feedbackTapToRateStackView.addArrangedSubview($0)
}

[feedbackTitleLabel, feedbackStarStackView, feedbackDateLabel, feedbackAuthorLabel, feedbackContentLabel, feedbackDeveloperTitleLabel, feedbackDeveloperContentLabel, feedbackMoreButton1, feedbackMoreButton2].forEach {
[feedbackTitleLabel, feedbackStarStackView, feedbackAuthorDateLabel, feedbackAuthorLabel, feedbackContentLabel, feedbackDeveloperTitleLabel, feedbackDeveloperContentLabel, feedbackDeveloperDateLabel, feedbackMoreButton1, feedbackMoreButton2].forEach {
feedbackBoxView.addSubview($0)
}
}
Expand Down Expand Up @@ -629,36 +645,39 @@ class AppDetailView: UIView {

feedbackTapToRateStackView.snp.makeConstraints {
$0.top.horizontalEdges.equalToSuperview()
$0.height.equalTo(28)
}

feedbackBoxView.snp.makeConstraints {
$0.top.equalTo(feedbackTapToRateStackView.snp.bottom).offset(10)
$0.top.equalTo(feedbackTapToRateStackView.snp.bottom).offset(20)
$0.horizontalEdges.equalToSuperview()
}

feedbackTitleLabel.snp.makeConstraints {
$0.top.leading.equalToSuperview().offset(20)
$0.top.equalToSuperview().offset(18)
$0.leading.equalTo(feedbackContentLabel)
}

feedbackStarStackView.snp.makeConstraints {
$0.leading.equalTo(feedbackTitleLabel)
$0.top.equalTo(feedbackTitleLabel.snp.bottom).offset(5)
$0.height.equalTo(20)
$0.leading.equalTo(feedbackContentLabel)
$0.top.equalTo(feedbackTitleLabel.snp.bottom).offset(4)
$0.height.equalTo(16)
$0.width.equalTo(80)
}

feedbackDateLabel.snp.makeConstraints {
$0.trailing.equalToSuperview().offset(-20)
feedbackAuthorDateLabel.snp.makeConstraints {
$0.trailing.equalTo(feedbackContentLabel)
$0.centerY.equalTo(feedbackTitleLabel)
}

feedbackAuthorLabel.snp.makeConstraints {
$0.trailing.equalTo(feedbackDateLabel)
$0.trailing.equalTo(feedbackContentLabel)
$0.centerY.equalTo(feedbackStarStackView)
}

feedbackContentLabel.snp.makeConstraints {
$0.horizontalEdges.equalToSuperview().inset(20)
$0.top.equalTo(feedbackStarStackView.snp.bottom).offset(15)
$0.top.equalTo(feedbackStarStackView.snp.bottom).offset(10)
}

feedbackMoreButton1.snp.makeConstraints {
Expand All @@ -670,6 +689,30 @@ class AppDetailView: UIView {
$0.leading.equalTo(feedbackContentLabel)
}

feedbackDeveloperDateLabel.snp.makeConstraints {
$0.trailing.equalTo(feedbackContentLabel)
$0.centerY.equalTo(feedbackDeveloperTitleLabel)
}

feedbackDeveloperContentLabel.snp.makeConstraints {
$0.horizontalEdges.equalTo(feedbackContentLabel)
$0.top.equalTo(feedbackDeveloperTitleLabel.snp.bottom).offset(5)
$0.bottom.equalToSuperview().offset(-20)
}

feedbackMoreButton2.snp.makeConstraints {
$0.bottom.trailing.equalTo(feedbackDeveloperContentLabel)
}

feedbackWriteButton.snp.makeConstraints {
$0.top.equalTo(feedbackBoxView.snp.bottom).offset(20)
$0.leading.equalTo(feedbackBoxView)
$0.bottom.equalToSuperview().offset(-10)
}

appSupportButton.snp.makeConstraints {
$0.top.equalTo(feedbackBoxView.snp.bottom).offset(20)
$0.trailing.equalTo(feedbackBoxView)
}
}
}
}
2 changes: 1 addition & 1 deletion 35-seminar/Presentation/Week2/Reusables/ContentLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ContentLabel: UILabel {

override init(frame: CGRect) {
super.init(frame: frame)
self.configureLabel(color: .label, size: 17, weight: .light, numberOfLines: 0)
self.configureLabel(color: .label, size: 15, weight: .light, numberOfLines: 0)
}

required init?(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SubtitleLabel: UILabel {

override init(frame: CGRect) {
super.init(frame: frame)
self.configureLabel(color: .secondaryLabel, size: 17, weight: .light)
self.configureLabel(color: .secondaryLabel, size: 15, weight: .light)
}

required init?(coder: NSCoder) {
Expand Down
2 changes: 1 addition & 1 deletion 35-seminar/Presentation/Week2/Reusables/TitleLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TitleLabel: UILabel {

override init(frame: CGRect) {
super.init(frame: frame)
self.configureLabel(size: 24, weight: .semibold)
self.configureLabel(size: 23, weight: .bold)
}

required init?(coder: NSCoder) {
Expand Down
Loading

0 comments on commit abe707f

Please sign in to comment.