From 0ae25abbe0c047a7e98da373ca4b6eec358873e8 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 16:35:00 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[FIX]=20=EC=BB=A4=EB=A6=AC=ED=81=98?= =?UTF-8?q?=EB=9F=BC=20=EB=A9=94=EC=9D=B8=EC=97=90=EC=84=9C=20=ED=99=94?= =?UTF-8?q?=EC=82=B4=ED=91=9C=20=EB=B0=A9=ED=96=A5=20=EB=B0=94=EA=BE=B8?= =?UTF-8?q?=EA=B3=A0=20=EC=9E=AC=EC=82=AC=EC=9A=A9=20=EC=9D=B4=EC=8A=88=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0=20(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Curriculum/Cells/CurriculumTableViewCell.swift | 5 +++-- .../ViewControllers/CurriculumViewController.swift | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift index e2a377c9..468ac471 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumTableViewCell.swift @@ -16,7 +16,7 @@ protocol CurriculumTableViewToggleButtonTappedProtocol: AnyObject { } final class CurriculumTableViewCell: UITableViewCell, TableViewCellRegisterDequeueProtocol { - + weak var delegate: CurriculumTableViewToggleButtonTappedProtocol? var cellIndexPath: IndexPath? @@ -78,9 +78,10 @@ final class CurriculumTableViewCell: UITableViewCell, TableViewCellRegisterDeque return line }() - private lazy var curriculumToggleDirectionButton: UIButton = { + lazy var curriculumToggleDirectionButton: UIButton = { var button = UIButton() button.setImage(ImageLiterals.Curriculum.arrowDownSmall, for: .normal) + button.setImage(ImageLiterals.Curriculum.arrowUpSmall, for: .selected) button.setContentCompressionResistancePriority(.required, for: .horizontal) button.addButtonAction { _ in self.delegate?.toggleButtonTapped(indexPath: self.cellIndexPath) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift index 7ba9112f..03a48d08 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift @@ -213,10 +213,13 @@ extension CurriculumViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = CurriculumTableViewCell.dequeueReusableCell(to: tableView) - cell.inputData = curriculumViewDatas[indexPath.section].weekDatas[indexPath.row] + let data = curriculumViewDatas[indexPath.section].weekDatas[indexPath.row] + cell.inputData = data cell.selectionStyle = .none cell.delegate = self cell.cellIndexPath = indexPath + + cell.curriculumToggleDirectionButton.isSelected = data.isExpanded return cell } From 5d8d73434496811b4ce44ae0d6161b1a43b91725 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 16:41:30 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[FIX]=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=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=A2=8C=EC=9A=B0=EB=A1=9C=20=EA=B0=94=EC=9D=84=EB=95=8C=20?= =?UTF-8?q?=EC=A3=BC=EC=B0=A8=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/CurriculumListByWeekViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift index 0f3620ef..1ab13448 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift @@ -181,7 +181,7 @@ private extension CurriculumListByWeekViewController { : currentPage + 1 guard let listByWeekDatas else { return } - let nextPage = min(listByWeekDatas.articleData.count - 1, nextIndexPathItem) + let nextPage = min(pregnancy - 1, nextIndexPathItem) self.currentPage = nextPage } From e3f686d340b7b21c0fe14927b7a4c88f44fbb61b Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 16:52:34 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[FIX]=20=EC=BB=A4=EB=A6=AC=ED=81=98?= =?UTF-8?q?=EB=9F=BC=20=EB=A9=94=EC=9D=B8=EC=97=90=EC=84=9C=20=EB=A7=88?= =?UTF-8?q?=EC=A7=80=EB=A7=89=20=EC=A3=BC=EC=B0=A8=EB=B3=84=20=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=A3=BC=EC=B0=A8=ED=91=9C=EA=B8=B0=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CurriculumListByWeekViewController.swift | 5 +++-- .../ViewControllers/CurriculumViewController.swift | 10 +--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift index 1ab13448..25a4948d 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift @@ -154,8 +154,9 @@ private extension CurriculumListByWeekViewController { guard let indexPath = notification.userInfo?["bookmarkCellIndexPath"] as? Int else { return } guard let buttonSelected = notification.userInfo?["bookmarkButtonSelected"] as? Bool else { return } guard let listByWeekDatas else { return } - try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath].articleId, - bookmarkStatus: buttonSelected)) + try await BookmarkService.shared.postBookmark( + BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath].articleId, + bookmarkStatus: buttonSelected)) hideLoading() } catch { guard let error = error as? NetworkError else { return } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift index 03a48d08..dbdd1c0e 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift @@ -256,15 +256,7 @@ extension CurriculumViewController: UITableViewDataSource { } let listByWeekVC = CurriculumListByWeekViewController() - - - if indexPath.section == curriculumViewDatas.count - 1 { - listByWeekVC.weekToIndexPathItem = (indexPath.section * 4) + indexPath.row + 1 - - } else { - listByWeekVC.weekToIndexPathItem = (indexPath.section * 4) + indexPath.row - } - + listByWeekVC.weekToIndexPathItem = (indexPath.section * 4) + indexPath.row self.navigationController?.pushViewController(listByWeekVC, animated: true) } From dce2b53d6170bf79a313f3f1990fa701560310a9 Mon Sep 17 00:00:00 2001 From: DongHyun Kim <113027703+bricksky@users.noreply.github.com> Date: Fri, 21 Jul 2023 19:26:55 +0900 Subject: [PATCH 4/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb255384..26d9e117 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

## 🍎 LionHeart-iOS Developers - | | | | | + | | | | | :---------:|:----------:|:---------:|:---------:|:---------:| κΉ€λ―Όμž¬ | κΉ€μ˜μ„± | κΉ€λ™ν˜„ | κ³½μ„±μ€€ | ν™©μ°¬λ―Έ | [ffalswo2](https://github.com/ffalswo2) | [kimscastle](https://github.com/kimscastle) | [BrickSky](https://github.com/BrickSky) | [sjk4618](https://github.com/sjk4618) |[cchanmi](https://github.com/cchanmi) | From 46549f2120ba4d5ef3fd8e7f8db3b7fb17f40ba8 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 19:49:44 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[FIX]=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=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=84=A3?= =?UTF-8?q?=EA=B8=B0(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionHeart-iOS.xcodeproj/project.pbxproj | 4 ++ ...lumArticleByWeekRowZeroTableViewCell.swift | 12 ++-- .../Model/CurriculumWeekBackgroundDummy.swift | 59 +++++++++++++++++++ 3 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Model/CurriculumWeekBackgroundDummy.swift diff --git a/LionHeart-iOS/LionHeart-iOS.xcodeproj/project.pbxproj b/LionHeart-iOS/LionHeart-iOS.xcodeproj/project.pbxproj index 3bea3fec..0cd7f7b0 100644 --- a/LionHeart-iOS/LionHeart-iOS.xcodeproj/project.pbxproj +++ b/LionHeart-iOS/LionHeart-iOS.xcodeproj/project.pbxproj @@ -98,6 +98,7 @@ B5C6A2BE2A5DE6590021BE5E /* GeneralTitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C6A2BD2A5DE6590021BE5E /* GeneralTitleTableViewCell.swift */; }; B5C6A2C22A5DEA1B0021BE5E /* CopyRightTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C6A2C12A5DEA1B0021BE5E /* CopyRightTableViewCell.swift */; }; B5C6A2C82A5EF4EB0021BE5E /* ArticleDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C6A2C72A5EF4EB0021BE5E /* ArticleDetail.swift */; }; + B5F323E92A6A8F0000047869 /* CurriculumWeekBackgroundDummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F323E82A6A8F0000047869 /* CurriculumWeekBackgroundDummy.swift */; }; C00780B72A5FFE0E0043EB36 /* UILabel+.swift in Sources */ = {isa = PBXBuildFile; fileRef = C00780B62A5FFE0E0043EB36 /* UILabel+.swift */; }; C00780BA2A60149D0043EB36 /* LHTodayArticleTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = C00780B92A60149D0043EB36 /* LHTodayArticleTitle.swift */; }; C06E381B2A65346700B00600 /* UserDefaultToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06E381A2A65346700B00600 /* UserDefaultToken.swift */; }; @@ -305,6 +306,7 @@ B5C6A2BD2A5DE6590021BE5E /* GeneralTitleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralTitleTableViewCell.swift; sourceTree = ""; }; B5C6A2C12A5DEA1B0021BE5E /* CopyRightTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyRightTableViewCell.swift; sourceTree = ""; }; B5C6A2C72A5EF4EB0021BE5E /* ArticleDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleDetail.swift; sourceTree = ""; }; + B5F323E82A6A8F0000047869 /* CurriculumWeekBackgroundDummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurriculumWeekBackgroundDummy.swift; sourceTree = ""; }; C00780B62A5FFE0E0043EB36 /* UILabel+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+.swift"; sourceTree = ""; }; C00780B92A60149D0043EB36 /* LHTodayArticleTitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LHTodayArticleTitle.swift; sourceTree = ""; }; C06E381A2A65346700B00600 /* UserDefaultToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultToken.swift; sourceTree = ""; }; @@ -1360,6 +1362,7 @@ children = ( F4490C062A5CEEA300A6D9D7 /* CurriculumDummyData.swift */, F4DB30AF2A611C9700413EB9 /* CurriculumListByWeekData.swift */, + B5F323E82A6A8F0000047869 /* CurriculumWeekBackgroundDummy.swift */, ); path = Model; sourceTree = ""; @@ -1589,6 +1592,7 @@ B59892EC2A5B94E100CE1FEB /* UIApplication+.swift in Sources */, 4AE19A172A65864F00C1DB7E /* BookmarkService.swift in Sources */, 4AE19A1A2A65886100C1DB7E /* BookmarkReponse.swift in Sources */, + B5F323E92A6A8F0000047869 /* CurriculumWeekBackgroundDummy.swift in Sources */, C0DF039F2A5CABC10037F740 /* GetPregnancyViewController.swift in Sources */, C0DF035F2A5A9C330037F740 /* ArticleListByWeekViewController.swift in Sources */, F4DB30BC2A61691F00413EB9 /* CurriculumArticleByWeekRowZeroTableViewCell.swift in Sources */, diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift index 58a0bcf6..ef0b6d47 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift @@ -11,20 +11,22 @@ import UIKit import SnapKit final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableViewCellRegisterDequeueProtocol { - + var inputData: Int? { didSet { guard let inputData else { return } //inputDataλŠ” rowκ°€ 0뢀터인데 μ£Όμ°¨μ •λ³΄λŠ” 4μ£Όμ°¨λΆ€ν„° μ‹œμž‘μ΄λ―€λ‘œ +4λ₯Ό ν•΄μ€Œ + weekLabel.text = "\(inputData)μ£Όμ°¨" - + weekBackGroundImageView.image = WeekBackgroundImage.dummy()[inputData-4].weekBackgroundImage + } } private enum Size { static let weekBackGroundImageSize: CGFloat = 200 / 375 } - + private let weekBackGroundImageView: UIImageView = { let imageView = UIImageView() imageView.backgroundColor = .designSystem(.gray500) @@ -37,7 +39,7 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV button.setImage(ImageLiterals.Curriculum.arrowLeftWeek, for: .normal) button.addButtonAction { _ in - NotificationCenter.default.post(name: NSNotification.Name("leftButton"), + NotificationCenter.default.post(name: NSNotification.Name("leftButton"), object: nil) } return button @@ -72,7 +74,7 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV }() private let curriculumAndWeekStackView: UIStackView = { - let stackView = UIStackView() + let stackView = UIStackView() stackView.spacing = 2 stackView.distribution = .fill stackView.axis = .vertical diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Model/CurriculumWeekBackgroundDummy.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Model/CurriculumWeekBackgroundDummy.swift new file mode 100644 index 00000000..4dbf73fe --- /dev/null +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Model/CurriculumWeekBackgroundDummy.swift @@ -0,0 +1,59 @@ +// +// CurriculumWeekBackgroundDummy.swift +// LionHeart-iOS +// +// Created by κΉ€λ―Όμž¬ on 2023/07/21. +// + +import UIKit + +struct WeekBackgroundImage: AppData { + let weekBackgroundImage: UIImage +} + +extension WeekBackgroundImage { + static func dummy() -> [WeekBackgroundImage] { + return [WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week4Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week5Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week6Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week7Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week8Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week9Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week10Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week11Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week12Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week13Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week14Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week15Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week16Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week17Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week18Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week19Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week20Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week21Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week22Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week23Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week24Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week25Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week26Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week27Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week28Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week29Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week30Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week31Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week32Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week33Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week34Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week35Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week36Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week37Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week38Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week39Image), + WeekBackgroundImage(weekBackgroundImage: ImageLiterals.Curriculum.week40Image) + + + + ] + + } +} From 6eec94426a73bd62516afd9591c4c9cebf588b52 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 21:05:47 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[FIX]=20imageView=20cell=20reuse=EB=90=98?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=84=20=EC=B4=88=EA=B8=B0=ED=99=94=20(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift | 4 ++-- .../Article/ArticleDetail/Cells/ThumnailTableViewCell.swift | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift index 50dfea1e..d41a7f3a 100644 --- a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift +++ b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift @@ -63,8 +63,8 @@ extension AppDelegate: MessagingDelegate { print("βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…fcmTokenλ°›μ•„μ˜€κΈ° μ„±κ³΅βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…") print("fcmToken: ", fcmToken) - var refeshToken = UserDefaultsManager.tokenKey?.refreshToken - var accessToken = UserDefaultsManager.tokenKey?.accessToken + let refeshToken = UserDefaultsManager.tokenKey?.refreshToken + let accessToken = UserDefaultsManager.tokenKey?.accessToken UserDefaultsManager.tokenKey = UserDefaultToken(refreshToken: refeshToken, accessToken: accessToken, fcmToken: fcmToken) } } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift index 5e4e80bd..3ba87553 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift @@ -67,6 +67,10 @@ final class ThumnailTableViewCell: UITableViewCell, TableViewCellRegisterDequeue required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } + + override func prepareForReuse() { + self.thumbnailImageView.image = nil + } } private extension ThumnailTableViewCell { From 254eb60080a6491e2a80f716c823761cd4297ca1 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 22:01:30 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[ADD]=20gradientImageView=20=EC=8D=B8?= =?UTF-8?q?=EB=84=A4=EC=9D=BCcell=EC=97=90=20=EC=B6=94=EA=B0=80=20(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArticleDetail/Cells/ThumnailTableViewCell.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift index 3ba87553..4eb6a47f 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Cells/ThumnailTableViewCell.swift @@ -25,6 +25,12 @@ final class ThumnailTableViewCell: UITableViewCell, TableViewCellRegisterDequeue return imageView }() + let gradientImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = ImageLiterals.Curriculum.gradient + return imageView + }() + private let imageCaptionLabel: UILabel = { let label = UILabel() label.font = .pretendard(.body4) @@ -77,6 +83,7 @@ private extension ThumnailTableViewCell { func setHierarchy() { contentView.addSubviews(thumbnailImageView, imageCaptionLabel, bookMarkButton) + thumbnailImageView.addSubview(gradientImageView) } func setLayout() { @@ -86,6 +93,11 @@ private extension ThumnailTableViewCell { make.height.equalTo(thumbnailImageView.snp.width).multipliedBy(Size.thumbnailWidthHeightRatio) } + gradientImageView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.leading.trailing.equalToSuperview() + } + imageCaptionLabel.snp.makeConstraints { make in make.top.equalTo(thumbnailImageView.snp.bottom).offset(12) make.centerX.equalTo(thumbnailImageView) From fde8fc8a30dc63727b3b2777c16a07ff5ea7e9d2 Mon Sep 17 00:00:00 2001 From: Kim Minjae Date: Fri, 21 Jul 2023 22:01:41 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[CHORE]=20ArticleDetail=20=EB=B0=B0?= =?UTF-8?q?=EA=B2=BD=EC=83=89=20=EB=B3=80=EA=B2=BD=20(#113)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/ArticleDetailViewController.swift | 7 +++++-- .../ArticleDetail/Views/ArticleDetailTableView.swift | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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 7771c093..da86c181 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift @@ -18,8 +18,6 @@ final class ArticleDetailViewController: UIViewController { private var progressBar = LHProgressView() private let articleTableView = ArticleDetailTableView() - - private let loadingIndicatorView = LHLoadingView() private lazy var scrollToTopButton: UIButton = { let button = UIButton() @@ -52,6 +50,7 @@ final class ArticleDetailViewController: UIViewController { public override func viewDidLoad() { super.viewDidLoad() + setStyle() setHierarchy() setLayout() setTableView() @@ -120,6 +119,10 @@ extension ArticleDetailViewController: ViewControllerServiceable { // MARK: - UI & Layout private extension ArticleDetailViewController { + + func setStyle() { + self.view.backgroundColor = .designSystem(.background) + } func setHierarchy() { view.addSubviews(navigationBar, articleTableView, progressBar, scrollToTopButton) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift index e13537c6..c44e41eb 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift @@ -21,7 +21,7 @@ class ArticleDetailTableView: UITableView { } private func setUI() { - self.backgroundColor = .designSystem(.black) + self.backgroundColor = .designSystem(.background) } private func setTableView() { From ff7b89317008e480845e9cd0f44f6742692bdf0a Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 23:15:10 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[FIX]=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=86=92=EC=9D=B4=20=EC=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift | 2 +- .../LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift index b5f06e5f..50dfea1e 100644 --- a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift +++ b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift @@ -59,7 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { extension AppDelegate: MessagingDelegate { func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { -// guard let fcmToken else { return } + guard let fcmToken else { return } print("βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…fcmTokenλ°›μ•„μ˜€κΈ° μ„±κ³΅βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…") print("fcmToken: ", fcmToken) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift index 8e5948ad..d010a5f1 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift @@ -33,7 +33,7 @@ extension LHToastView { self.addSubview(messageLabel) self.snp.makeConstraints { make in - make.height.equalTo(700) + make.height.equalTo(50) } self.messageLabel.snp.makeConstraints { make in make.center.equalToSuperview()