From 90d3e3b6f1c69fafe0bc6550e76d3f8ba81684fd Mon Sep 17 00:00:00 2001 From: kong <1018dbrud@gmail.com> Date: Sun, 10 Dec 2023 19:00:49 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81,=20=EC=A3=BC=EC=86=8C?= =?UTF-8?q?=20=EA=B8=B8=EC=96=B4=EC=A7=88=20=EA=B2=BD=EC=9A=B0=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Layover/DesignSystem/LOImageLabel.swift | 2 ++ .../UploadPost/UploadPostViewController.swift | 17 +++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/iOS/Layover/Layover/DesignSystem/LOImageLabel.swift b/iOS/Layover/Layover/DesignSystem/LOImageLabel.swift index f30387f..30e6556 100644 --- a/iOS/Layover/Layover/DesignSystem/LOImageLabel.swift +++ b/iOS/Layover/Layover/DesignSystem/LOImageLabel.swift @@ -20,6 +20,7 @@ final class LOImageLabel: UIView { let label = UILabel() label.font = .loFont(type: .body2Semibold) label.textAlignment = .left + label.numberOfLines = 1 return label }() @@ -54,6 +55,7 @@ final class LOImageLabel: UIView { titleLabel.topAnchor.constraint(equalTo: topAnchor), titleLabel.leadingAnchor.constraint(equalTo: iconImageView.trailingAnchor, constant: 10), + titleLabel.trailingAnchor.constraint(equalTo: trailingAnchor), titleLabel.bottomAnchor.constraint(equalTo: bottomAnchor) ]) } diff --git a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift index 0836844..2b789ef 100644 --- a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift +++ b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift @@ -77,6 +77,8 @@ final class UploadPostViewController: BaseViewController { private let currentAddressLabel: UILabel = { let label = UILabel() label.font = .loFont(type: .body2) + label.numberOfLines = 1 + label.adjustsFontSizeToFitWidth = true return label }() @@ -143,10 +145,7 @@ final class UploadPostViewController: BaseViewController { super.setConstraints() view.addSubviews(scrollView, uploadButton) scrollView.addSubview(contentView) - [scrollView, uploadButton, contentView].forEach { - $0.translatesAutoresizingMaskIntoConstraints = false - } - + [scrollView, uploadButton, contentView].forEach { $0.translatesAutoresizingMaskIntoConstraints = false } NSLayoutConstraint.activate([ scrollView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), scrollView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16), @@ -164,16 +163,13 @@ final class UploadPostViewController: BaseViewController { uploadButton.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor), uploadButton.heightAnchor.constraint(equalToConstant: 50) ]) - setContentViewSubviewsConstraints() } private func setContentViewSubviewsConstraints() { contentView.addSubviews(thumbnailImageView, titleImageLabel, titleTextField, tagImageLabel, tagStackView, addTagButton, locationImageLabel, currentAddressLabel, contentImageLabel, contentTextView) - contentView.subviews.forEach { - $0.translatesAutoresizingMaskIntoConstraints = false - } + contentView.subviews.forEach { $0.translatesAutoresizingMaskIntoConstraints = false } NSLayoutConstraint.activate([ thumbnailImageView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 10), thumbnailImageView.widthAnchor.constraint(equalToConstant: 156), @@ -204,15 +200,16 @@ final class UploadPostViewController: BaseViewController { locationImageLabel.topAnchor.constraint(equalTo: tagStackView.bottomAnchor, constant: 22), locationImageLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), + locationImageLabel.widthAnchor.constraint(greaterThanOrEqualToConstant: 60), locationImageLabel.heightAnchor.constraint(equalToConstant: 22), currentAddressLabel.centerYAnchor.constraint(equalTo: locationImageLabel.centerYAnchor), + currentAddressLabel.leadingAnchor.constraint(equalTo: locationImageLabel.trailingAnchor, constant: 15), currentAddressLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), - currentAddressLabel.leadingAnchor.constraint(equalTo: locationImageLabel.trailingAnchor), contentImageLabel.topAnchor.constraint(equalTo: locationImageLabel.bottomAnchor, constant: 22), contentImageLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), - contentImageLabel.trailingAnchor.constraint(equalTo: currentAddressLabel.leadingAnchor), + contentImageLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), contentImageLabel.heightAnchor.constraint(equalToConstant: 22), contentTextView.topAnchor.constraint(equalTo: contentImageLabel.bottomAnchor, constant: 10),