From 21dfaef1032e0194640f62ec23699a5c96ea5f5b Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Sat, 22 Jul 2023 02:34:02 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[CHORE]=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=88=98=EC=A0=95=20(#121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Article/ArticleDetail/Cells/BodyTableViewCell.swift | 1 + .../ViewControllers/ArticleDetailViewController.swift | 1 + .../Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift | 1 + .../Scenes/Curriculum/Cells/CurriculumTableViewCell.swift | 1 + 4 files changed, 4 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/BodyTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/BodyTableViewCell.swift index 54eb16d8..9636bbd7 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/BodyTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/BodyTableViewCell.swift @@ -74,6 +74,7 @@ private extension BodyTableViewCell { guard let model else { return } if let caption = model.caption { captionLabel.text = caption + captionLabel.setTextWithLineHeight(lineHeight: 22) captionLabel.snp.makeConstraints { make in make.top.equalTo(bodyLabel.snp.bottom).offset(8) make.leading.trailing.equalTo(bodyLabel) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift index 2a45608a..f24bf1cf 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift @@ -89,6 +89,7 @@ extension ArticleDetailViewController { do { let bookmarkRequest = BookmarkRequest(articleId: articleId, bookmarkStatus: isSelected) try await BookmarkService.shared.postBookmark(bookmarkRequest) + LHToast.show(message: "북마크가 추가되었습니다") isBookMarked = isSelected } catch { guard let error = error as? NetworkError else { return } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift index f02409cc..dd2f3932 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift @@ -26,6 +26,7 @@ final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCell } articleTagLabel.text = inputData.articleTags.joined(separator: " · ") articleContentLabel.text = inputData.articleContent + articleContentLabel.setTextWithLineHeight(lineHeight: 22) articleContentLabel.lineBreakStrategy = .pushOut articleContentLabel.lineBreakMode = .byTruncatingTail bookMarkButton.isSelected = inputData.isArticleBookmarked diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift index 468ac471..149e1052 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift @@ -105,6 +105,7 @@ final class CurriculumTableViewCell: UITableViewCell, TableViewCellRegisterDeque self.weekTitleLabel.text = inputData.curriculumWeekTitle self.contentImageView.image = inputData.curriculumImage self.contentTextLabel.text = inputData.curriculumText + self.contentTextLabel.setTextWithLineHeight(lineHeight: 22) self.curriculumContentStackView.isHidden = !inputData.isExpanded // false -> true -> 안보이게됨 self.weekLabel.textColor = inputData.isExpanded ? .designSystem(.componentLionRed) From 0254bbf7b130d5f2ae0b38084997db5ab028352a Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Sat, 22 Jul 2023 03:16:15 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[FIX]=20ArticleDetailVC=20presentStyle=20fu?= =?UTF-8?q?llScreen=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95=20(#121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionHeart-iOS/Global/Extensions/UIViewController+.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift index 73e3be55..9347781e 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift @@ -92,7 +92,7 @@ extension UIViewController { let articleDetailViewController = ArticleDetailViewController() articleDetailViewController.setArticleId(id: articleID) articleDetailViewController.isModalInPresentation = true - articleDetailViewController.modalPresentationStyle = .overFullScreen + articleDetailViewController.modalPresentationStyle = .fullScreen self.present(articleDetailViewController, animated: true) } } From fbdba2f1584b0d43179296094780312f36ddca6a Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Sat, 22 Jul 2023 03:55:10 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[CHORE]=20=EC=BB=A4=EB=A6=AC=ED=81=98?= =?UTF-8?q?=EB=9F=BC=20=EC=A3=BC=EC=B0=A8=EB=B3=84=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=A3=BC=EC=B0=A8=EC=82=AC=EC=A7=84=20black=20blur?= =?UTF-8?q?view=20=EC=B6=94=EA=B0=80=20(#121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lumArticleByWeekRowZeroTableViewCell.swift | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift index ef0b6d47..31c2eb3b 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift @@ -33,6 +33,12 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV imageView.isUserInteractionEnabled = true return imageView }() + + private let blurblackView: UIView = { + let view = UIView() + view.backgroundColor = .designSystem(.black)?.withAlphaComponent(0.4) + return view + }() private lazy var leftWeekButton: UIButton = { let button = UIButton(type: .custom) @@ -83,15 +89,9 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) - // MARK: - 컴포넌트 설정 setUI() - - // MARK: - addsubView setHierarchy() - - // MARK: - autolayout설정 setLayout() - } @@ -108,9 +108,9 @@ private extension CurriculumArticleByWeekRowZeroTableViewCell { func setHierarchy() { curriculumAndWeekStackView.addArrangedSubviews(curriculumLabel, weekLabel) - weekBackGroundImageView.addSubviews(curriculumAndWeekStackView) + weekBackGroundImageView.addSubviews(blurblackView, curriculumAndWeekStackView) contentView.addSubviews(weekBackGroundImageView, leftWeekButton, rightWeekButton) - + } func setLayout() { @@ -119,6 +119,10 @@ private extension CurriculumArticleByWeekRowZeroTableViewCell { $0.edges.equalToSuperview() $0.height.equalTo(weekBackGroundImageView.snp.width).multipliedBy(Size.weekBackGroundImageSize) } + + blurblackView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } leftWeekButton.snp.makeConstraints{ $0.centerY.equalToSuperview() From 1fcc051557d98d85fa8d5bc8ecd47822b5e9102b Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Sat, 22 Jul 2023 03:56:14 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[CHORE]=20TodayVC=20=EB=84=A4=EB=B9=84?= =?UTF-8?q?=EB=B0=94=20=EC=95=84=EB=9E=98=20Seperator=20line=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/TodayViewController.swift | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift index d039d896..3b0f0202 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift @@ -20,12 +20,6 @@ final class TodayViewController: UIViewController { private lazy var todayNavigationBar = LHNavigationBarView(type: .today, viewController: self) - private let seperateLine: UIView = { - let view = UIView() - view.backgroundColor = .designSystem(.gray800) - return view - }() - private var titleLabel = LHTodayArticleTitle() private var subTitleLable = LHTodayArticleTitle(initalizeString: "오늘의 아티클이에요") private var mainArticleView = TodayArticleView() @@ -90,7 +84,7 @@ private extension TodayViewController { } func setHierarchy() { - view.addSubviews(todayNavigationBar, seperateLine) + view.addSubviews(todayNavigationBar) view.addSubviews(titleLabel, subTitleLable, pointImage, mainArticleView) } @@ -100,14 +94,8 @@ private extension TodayViewController { make.leading.trailing.equalToSuperview() } - seperateLine.snp.makeConstraints { make in - make.top.equalTo(todayNavigationBar.snp.bottom) - make.leading.trailing.equalToSuperview() - make.height.equalTo(1) - } - titleLabel.snp.makeConstraints { make in - make.top.equalTo(seperateLine.snp.bottom).offset(53) + make.top.equalTo(todayNavigationBar.snp.bottom).offset(53) make.leading.equalToSuperview().inset(20) } From 28e7065d829c11f718015ded307c94597f026481 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Sat, 22 Jul 2023 04:15:54 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[CHORE]=20Button=20=EC=98=81=EC=97=AD=2044p?= =?UTF-8?q?x=EB=A1=9C=20=EC=88=98=EC=A0=95=20(#121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionHeart-iOS/Global/Extensions/UIButton+.swift | 2 +- .../Global/UIComponents/LHNavigationBarView.swift | 6 ++++-- .../Curriculum/Cells/CurriculumTableViewCell.swift | 3 ++- .../Curriculum/Views/CurriculumUserInfoView.swift | 10 +++------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIButton+.swift b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIButton+.swift index b87316bc..a306dc0b 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIButton+.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIButton+.swift @@ -21,7 +21,7 @@ extension UIButton { extension UIButton { func marginImageWithText(margin: CGFloat) { - let halfSize = margin/2 + let halfSize = margin / 2 imageEdgeInsets = UIEdgeInsets(top: 0, left: -halfSize, bottom: 0, right: halfSize) titleEdgeInsets = UIEdgeInsets(top: 0, left: halfSize, bottom: 0, right: -halfSize) contentEdgeInsets = UIEdgeInsets(top: 0, left: halfSize, bottom: 0, right: halfSize) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHNavigationBarView.swift b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHNavigationBarView.swift index c22fda91..bf910cd5 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHNavigationBarView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHNavigationBarView.swift @@ -21,6 +21,7 @@ final class LHNavigationBarView: UIView { private let leftBarItem: UIButton = { let button = UIButton() button.tintColor = .designSystem(.white) + button.marginImageWithText(margin: 14) return button }() @@ -28,6 +29,7 @@ final class LHNavigationBarView: UIView { let button = UIButton() button.setImage(ImageLiterals.NavigationBar.bookMark, for: .normal) button.tintColor = .designSystem(.white) + button.marginImageWithText(margin: 14) return button }() @@ -35,6 +37,7 @@ final class LHNavigationBarView: UIView { let button = UIButton() button.setImage(ImageLiterals.NavigationBar.profile, for: .normal) button.tintColor = .designSystem(.white) + button.marginImageWithText(margin: 14) return button }() @@ -49,7 +52,6 @@ final class LHNavigationBarView: UIView { rightFirstBarItem, rightSecondBarItem ]) stackView.axis = .horizontal - stackView.spacing = 8 stackView.alignment = .center stackView.distribution = .equalSpacing stackView.isHidden = true @@ -110,7 +112,7 @@ final class LHNavigationBarView: UIView { rightBarItemsStackView.snp.makeConstraints { make in make.centerY.equalTo(leftBarItem) - make.trailing.equalToSuperview().inset(24) + make.trailing.equalToSuperview().inset(16) } graySepartorLine.snp.makeConstraints { make in diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift index 149e1052..2db23f4f 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift @@ -80,6 +80,7 @@ final class CurriculumTableViewCell: UITableViewCell, TableViewCellRegisterDeque lazy var curriculumToggleDirectionButton: UIButton = { var button = UIButton() + button.marginImageWithText(margin: 19) button.setImage(ImageLiterals.Curriculum.arrowDownSmall, for: .normal) button.setImage(ImageLiterals.Curriculum.arrowUpSmall, for: .selected) button.setContentCompressionResistancePriority(.required, for: .horizontal) @@ -166,7 +167,7 @@ private extension CurriculumTableViewCell { curriculumToggleDirectionButton.snp.makeConstraints{ $0.leading.greaterThanOrEqualTo(weekTitleLabel.snp.trailing).offset(8) $0.centerY.equalTo(weekLabel) - $0.trailing.equalToSuperview() + $0.trailing.equalToSuperview().offset(12) } curriculumWholeStackView.snp.makeConstraints{ diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Views/CurriculumUserInfoView.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Views/CurriculumUserInfoView.swift index 3041e294..70d8793f 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Views/CurriculumUserInfoView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Views/CurriculumUserInfoView.swift @@ -47,6 +47,7 @@ final class CurriculumUserInfoView: UIView { let label = UILabel() label.font = .pretendard(.head3) label.textColor = .designSystem(.gray100) + label.textAlignment = .center return label }() @@ -67,13 +68,8 @@ final class CurriculumUserInfoView: UIView { } override func layoutSubviews() { - // MARK: - 컴포넌트 설정 setUI() - - // MARK: - addsubView setHierarchy() - - // MARK: - autolayout설정 setLayout() } @@ -91,6 +87,7 @@ extension CurriculumUserInfoView { func setHierarchy() { self.addSubviews(userWeekDayInfoView, weekImageView, userWeekLabel, weekLabel, dayImageView, userDayLabel, dayLabel) + dayImageView.addSubview(userDayLabel) } func setLayout() { @@ -116,8 +113,7 @@ extension CurriculumUserInfoView { } userDayLabel.snp.makeConstraints{ - $0.leading.equalTo(dayImageView.snp.leading).offset(4) - $0.centerY.equalTo(dayImageView) + $0.center.equalToSuperview() } dayLabel.snp.makeConstraints{