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/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) } } 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/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/CurriculumArticleByWeekRowZeroTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift index 2e6dfd89..88236311 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift @@ -34,6 +34,12 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV imageView.contentMode = .scaleAspectFill 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) @@ -84,15 +90,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() - } @@ -109,9 +109,9 @@ private extension CurriculumArticleByWeekRowZeroTableViewCell { func setHierarchy() { curriculumAndWeekStackView.addArrangedSubviews(curriculumLabel, weekLabel) - weekBackGroundImageView.addSubviews(curriculumAndWeekStackView) + weekBackGroundImageView.addSubviews(blurblackView, curriculumAndWeekStackView) contentView.addSubviews(weekBackGroundImageView, leftWeekButton, rightWeekButton) - + } func setLayout() { @@ -120,6 +120,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() diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift index da6d0185..210e76f1 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..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) @@ -105,6 +106,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) @@ -165,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{ 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) }