diff --git a/README.md b/README.md
index 5b80e898..ad6f4019 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
-
+[
](https://apps.apple.com/kr/app/%ED%84%B0%EB%8B%9D-terning-%EB%8C%80%ED%95%99%EC%83%9D-%EC%9D%B8%ED%84%B4-%EA%B3%B5%EA%B3%A0-%EA%B4%80%EB%A6%AC-%EC%BA%98%EB%A6%B0%EB%8D%94/id6547866420)
+
# ๐ terning ํฐ๋ - ๋ํ์ ์ธํด, ๊ณต๊ณ ๊ด๋ฆฌ ์บ๋ฆฐ๋
-## ์ฑ์คํ ์ด ๋งํฌ : [์ฑ์คํ ์ด](https://apps.apple.com/kr/app/terning-%ED%84%B0%EB%8B%9D-%EB%8C%80%ED%95%99%EC%83%9D-%EC%9D%B8%ED%84%B4-%EA%B3%B5%EA%B3%A0-%EA%B4%80%EB%A6%AC-%EC%BA%98%EB%A6%B0%EB%8D%94/id6547866420) v1.0.5
+## ์ฑ์คํ ์ด ๋งํฌ : [์ฑ์คํ ์ด](https://apps.apple.com/kr/app/terning-%ED%84%B0%EB%8B%9D-%EB%8C%80%ED%95%99%EC%83%9D-%EC%9D%B8%ED%84%B4-%EA%B3%B5%EA%B3%A0-%EA%B4%80%EB%A6%AC-%EC%BA%98%EB%A6%B0%EB%8D%94/id6547866420) v1.1.0

**๋ด ๊ณํ์ ๋ฑ ๋ง๋ ๋ํ์ ์ธํด์ ์์, ํฐ๋**
diff --git a/Terning-iOS/.swiftlint.yml b/Terning-iOS/.swiftlint.yml
index c8d9bf83..4e85f92a 100644
--- a/Terning-iOS/.swiftlint.yml
+++ b/Terning-iOS/.swiftlint.yml
@@ -28,6 +28,7 @@ excluded:
- Terning-iOS/Resource/UIComponents/CustomAlertViewController.swift
- Terning-iOS/Resource/UIComponents/NewCustomAlertVC.swift
- Terning-iOS/Source/Presentation/Calendar/ViewController/TNCalendarViewController.swift
+ - Terning-iOS/Source/Presentation/RefactorHome/NewHomeViewController.swift
file_length:
warning: 400 # 400์ค ๋์ด๊ฐ๋ฉด ๊ฒฝ๊ณ ์
๋๋ค ^_^
diff --git a/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj b/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
index 37916d87..a31b7cee 100644
--- a/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
+++ b/Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
@@ -181,27 +181,15 @@
71F8F9342D281C9200B822F3 /* ScrapRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F8F9332D281C9200B822F3 /* ScrapRepository.swift */; };
71F8F9362D281CC500B822F3 /* ScrapUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F8F9352D281CC500B822F3 /* ScrapUseCase.swift */; };
71F918522D0A29F700FA0430 /* ComposableArchitecture in Frameworks */ = {isa = PBXBuildFile; productRef = 71F918512D0A29F700FA0430 /* ComposableArchitecture */; };
- 71FFB2B52C47ECF200C60697 /* CustomBottmSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FFB2B42C47ECF200C60697 /* CustomBottmSheetViewController.swift */; };
71FFB2B82C48286300C60697 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FFB2B72C48286300C60697 /* SplashViewController.swift */; };
- 71FFB2BD2C4A186900C60697 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FFB2BC2C4A186900C60697 /* HomeViewController.swift */; };
- 71FFB2BF2C4A188A00C60697 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FFB2BE2C4A188A00C60697 /* HomeView.swift */; };
- 71FFB2C42C4A81E200C60697 /* FilterInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FFB2C32C4A81E200C60697 /* FilterInfoCell.swift */; };
- B833F7D22C8EC661006AE46E /* CheckDeadlineCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B833F7D12C8EC661006AE46E /* CheckDeadlineCell.swift */; };
B853C88A2C7B2F6B00AA439C /* SortSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B853C8892C7B2F6B00AA439C /* SortSettingViewController.swift */; };
B855485A2C47EEBB00EC67F6 /* UserProfileInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B85548592C47EEBB00EC67F6 /* UserProfileInfoModel.swift */; };
B855485D2C48026B00EC67F6 /* MyPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B855485C2C48026B00EC67F6 /* MyPageView.swift */; };
B855485F2C48027500EC67F6 /* MyPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B855485E2C48027500EC67F6 /* MyPageViewController.swift */; };
B86A67582C41166900CB90E5 /* FilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86A67572C41166800CB90E5 /* FilterButton.swift */; };
B871D7232C3E8836008D78C2 /* JobCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7222C3E8835008D78C2 /* JobCardModel.swift */; };
- B871D7252C3E8A53008D78C2 /* ScrapInfoHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7242C3E8A53008D78C2 /* ScrapInfoHeaderCell.swift */; };
- B871D7292C3E8E46008D78C2 /* JobCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7282C3E8E46008D78C2 /* JobCardCell.swift */; };
- B871D7312C3E9118008D78C2 /* NonScrapInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7302C3E9118008D78C2 /* NonScrapInfoCell.swift */; };
- B871D7332C3EC148008D78C2 /* IsScrapInfoViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7322C3EC148008D78C2 /* IsScrapInfoViewCell.swift */; };
B871D7352C3ECF37008D78C2 /* UpcomingCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7342C3ECF37008D78C2 /* UpcomingCard.swift */; };
- B871D7372C3EF87B008D78C2 /* NonJobCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B871D7362C3EF87B008D78C2 /* NonJobCardCell.swift */; };
- B8A5A5AE2C78780B007C33C5 /* GradientLayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8A5A5AD2C78780B007C33C5 /* GradientLayerView.swift */; };
B8BE0E142C46D38700B3D298 /* UserFilteringInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8BE0E132C46D38700B3D298 /* UserFilteringInfoModel.swift */; };
- B8C5DB6E2C3F353D00865B1A /* UnavailableFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C5DB6D2C3F353D00865B1A /* UnavailableFilterView.swift */; };
B8C5DB712C3F39B900865B1A /* FilteringSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C5DB702C3F39B900865B1A /* FilteringSettingView.swift */; };
B8C5DB732C3F39C700865B1A /* FilteringSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C5DB722C3F39C700865B1A /* FilteringSettingViewController.swift */; };
B8F503382C749309000D2A22 /* Config.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = B8F503372C749309000D2A22 /* Config.xcconfig */; };
@@ -371,27 +359,15 @@
71F8F8752D278C7800B822F3 /* HomeUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeUseCase.swift; sourceTree = ""; };
71F8F9332D281C9200B822F3 /* ScrapRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrapRepository.swift; sourceTree = ""; };
71F8F9352D281CC500B822F3 /* ScrapUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrapUseCase.swift; sourceTree = ""; };
- 71FFB2B42C47ECF200C60697 /* CustomBottmSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomBottmSheetViewController.swift; sourceTree = ""; };
71FFB2B72C48286300C60697 /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; };
- 71FFB2BC2C4A186900C60697 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; };
- 71FFB2BE2C4A188A00C60697 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; };
- 71FFB2C32C4A81E200C60697 /* FilterInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterInfoCell.swift; sourceTree = ""; };
- B833F7D12C8EC661006AE46E /* CheckDeadlineCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckDeadlineCell.swift; sourceTree = ""; };
B853C8892C7B2F6B00AA439C /* SortSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortSettingViewController.swift; sourceTree = ""; };
B85548592C47EEBB00EC67F6 /* UserProfileInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileInfoModel.swift; sourceTree = ""; };
B855485C2C48026B00EC67F6 /* MyPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageView.swift; sourceTree = ""; };
B855485E2C48027500EC67F6 /* MyPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageViewController.swift; sourceTree = ""; };
B86A67572C41166800CB90E5 /* FilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterButton.swift; sourceTree = ""; };
B871D7222C3E8835008D78C2 /* JobCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobCardModel.swift; sourceTree = ""; };
- B871D7242C3E8A53008D78C2 /* ScrapInfoHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrapInfoHeaderCell.swift; sourceTree = ""; };
- B871D7282C3E8E46008D78C2 /* JobCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobCardCell.swift; sourceTree = ""; };
- B871D7302C3E9118008D78C2 /* NonScrapInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonScrapInfoCell.swift; sourceTree = ""; };
- B871D7322C3EC148008D78C2 /* IsScrapInfoViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsScrapInfoViewCell.swift; sourceTree = ""; };
B871D7342C3ECF37008D78C2 /* UpcomingCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpcomingCard.swift; sourceTree = ""; };
- B871D7362C3EF87B008D78C2 /* NonJobCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonJobCardCell.swift; sourceTree = ""; };
- B8A5A5AD2C78780B007C33C5 /* GradientLayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientLayerView.swift; sourceTree = ""; };
B8BE0E132C46D38700B3D298 /* UserFilteringInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserFilteringInfoModel.swift; sourceTree = ""; };
- B8C5DB6D2C3F353D00865B1A /* UnavailableFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnavailableFilterView.swift; sourceTree = ""; };
B8C5DB702C3F39B900865B1A /* FilteringSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilteringSettingView.swift; sourceTree = ""; };
B8C5DB722C3F39C700865B1A /* FilteringSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilteringSettingViewController.swift; sourceTree = ""; };
B8F503372C749309000D2A22 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; };
@@ -399,16 +375,21 @@
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
- 71D01B312D142A3F00E8A8CE /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
+ 71CDCF782D33C5430087BF6B /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
+ Cell/CheckDeadlineCell.swift,
Cell/ClosingJobAnnouncementCell.swift,
Cell/HomeTopCell.swift,
+ Cell/JobCardCell.swift,
+ Cell/NonScrapInfoCell.swift,
Cell/StickyHeaderCell.swift,
- MainFilterButton.swift,
- MainSortButton.swift,
- NewHomeView.swift,
- NewHomeViewController.swift,
+ Cell/UnavailableFilterView.swift,
+ View/GradientLayerView.swift,
+ View/HomeView.swift,
+ View/MainFilterButton.swift,
+ View/MainSortButton.swift,
+ ViewController/HomeViewController.swift,
ViewModel/HomeViewModel.swift,
);
target = 71E3C3C82C22BAF40026C4DD /* Terning-iOS */;
@@ -429,7 +410,7 @@
/* Begin PBXFileSystemSynchronizedRootGroup section */
713C5A772CC15B7E00321E15 /* Amplitude */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Amplitude; sourceTree = ""; };
- 71D01B2E2D142A2500E8A8CE /* RefactorHome */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71D01B312D142A3F00E8A8CE /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = RefactorHome; sourceTree = ""; };
+ 71CDCF742D33C5350087BF6B /* Home */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71CDCF782D33C5430087BF6B /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Home; sourceTree = ""; };
71DA88DA2CFDC81D0003078C /* SwiftUI+ */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "SwiftUI+"; sourceTree = ""; };
71DA89952CFDFA460003078C /* SwiftUI */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71DA89982CFDFA960003078C /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = SwiftUI; sourceTree = ""; };
/* End PBXFileSystemSynchronizedRootGroup section */
@@ -985,7 +966,6 @@
2D8CCF122D110B340030E8E5 /* CustomSegmentedControl.swift */,
7121A1522C3DE3680056DB8B /* CustomNavigationBar.swift */,
7121A13F2C3AB9EE0056DB8B /* JobDetailInfoView.swift */,
- 71FFB2B42C47ECF200C60697 /* CustomBottmSheetViewController.swift */,
719C6DED2C91F150006AF9C9 /* CustomAlertViewController.swift */,
71F004C62C957C8C00CD202B /* EmptyView.swift */,
);
@@ -1318,11 +1298,10 @@
71E3C3E82C241C020026C4DD /* Presentation */ = {
isa = PBXGroup;
children = (
- 71D01B2E2D142A2500E8A8CE /* RefactorHome */,
2DD4837E2C4B3782000541E3 /* AccountOption */,
71CCC06D2C3F369A00789A9B /* Calendar */,
B8C5DB6F2C3F39A500865B1A /* FilteringSetting */,
- 71FFB2BB2C4A179000C60697 /* Home */,
+ 71CDCF742D33C5350087BF6B /* Home */,
2DC61EEE2C40759F009F991F /* JobDetail */,
2DC61F132C41A52E009F991F /* Login */,
B855485B2C48025600EC67F6 /* MyPage */,
@@ -1445,32 +1424,6 @@
path = Splash;
sourceTree = "";
};
- 71FFB2BB2C4A179000C60697 /* Home */ = {
- isa = PBXGroup;
- children = (
- 71FFB2C02C4A7B4000C60697 /* Cell */,
- 71FFB2BC2C4A186900C60697 /* HomeViewController.swift */,
- 71FFB2BE2C4A188A00C60697 /* HomeView.swift */,
- B8A5A5AD2C78780B007C33C5 /* GradientLayerView.swift */,
- );
- path = Home;
- sourceTree = "";
- };
- 71FFB2C02C4A7B4000C60697 /* Cell */ = {
- isa = PBXGroup;
- children = (
- B871D7242C3E8A53008D78C2 /* ScrapInfoHeaderCell.swift */,
- B833F7D12C8EC661006AE46E /* CheckDeadlineCell.swift */,
- B871D7302C3E9118008D78C2 /* NonScrapInfoCell.swift */,
- B871D7322C3EC148008D78C2 /* IsScrapInfoViewCell.swift */,
- 71FFB2C32C4A81E200C60697 /* FilterInfoCell.swift */,
- B871D7282C3E8E46008D78C2 /* JobCardCell.swift */,
- B871D7362C3EF87B008D78C2 /* NonJobCardCell.swift */,
- B8C5DB6D2C3F353D00865B1A /* UnavailableFilterView.swift */,
- );
- path = Cell;
- sourceTree = "";
- };
B853C8882C7B2F4800AA439C /* SortSetting */ = {
isa = PBXGroup;
children = (
@@ -1658,9 +1611,7 @@
2DF257272C8F692B00B85843 /* ProfileViewModelType.swift in Sources */,
2DF257292C8F6A7D00B85843 /* ProfileImageUtils.swift in Sources */,
71780C4C2C4598590073B731 /* ScrapsTargetType.swift in Sources */,
- B871D7332C3EC148008D78C2 /* IsScrapInfoViewCell.swift in Sources */,
2DF256FA2C8C85AC00B85843 /* MyPageCellModel.swift in Sources */,
- B8A5A5AE2C78780B007C33C5 /* GradientLayerView.swift in Sources */,
2D8CCF0F2D110A990030E8E5 /* JobFilteringViewController.swift in Sources */,
2D4EE3962C3DD5CB00E3E95B /* WelcomeViewController.swift in Sources */,
2DD4DC932D1F80DD0036D08D /* FiltersService.swift in Sources */,
@@ -1668,9 +1619,7 @@
7121A1572C3EA4C10056DB8B /* LoadingIndicator.swift in Sources */,
71E3C40F2C243B510026C4DD /* UIView+.swift in Sources */,
2D4EE3A42C3E789200E3E95B /* ProfileView.swift in Sources */,
- 71FFB2B52C47ECF200C60697 /* CustomBottmSheetViewController.swift in Sources */,
B8C5DB712C3F39B900865B1A /* FilteringSettingView.swift in Sources */,
- 71FFB2C42C4A81E200C60697 /* FilterInfoCell.swift in Sources */,
2DC9860B2C46056300D46729 /* RecommendAnnouncementModel.swift in Sources */,
7121A1432C3AE9C20056DB8B /* PaletteCell.swift in Sources */,
71665AAC2C7C4A94008EB0D7 /* EventView.swift in Sources */,
@@ -1681,7 +1630,6 @@
2DF256FD2C8C86C400B85843 /* MyPageViewModel.swift in Sources */,
2DC61EFD2C40823C009F991F /* CompanyInfoTableViewCell.swift in Sources */,
B855485D2C48026B00EC67F6 /* MyPageView.swift in Sources */,
- 71FFB2BF2C4A188A00C60697 /* HomeView.swift in Sources */,
7121A13E2C3A98E10056DB8B /* LabelFactory.swift in Sources */,
71780C562C45A81E0073B731 /* AuthInterceptor.swift in Sources */,
2D74E5082D1F26100018A56E /* FilteringViewModel.swift in Sources */,
@@ -1732,7 +1680,6 @@
2DF256F32C8C855700B85843 /* MyPageBasicViewCell.swift in Sources */,
7121A1462C3B07AA0056DB8B /* BaseResponse.swift in Sources */,
71CCC07F2C40377E00789A9B /* TNCalendarDateCell.swift in Sources */,
- B8C5DB6E2C3F353D00865B1A /* UnavailableFilterView.swift in Sources */,
2DF2571E2C8DEF7E00B85843 /* AccountOptionViewModelType.swift in Sources */,
7121A1352C39CCF60056DB8B /* UIButton+.swift in Sources */,
7121A1552C3EA01F0056DB8B /* Toast.swift in Sources */,
@@ -1750,16 +1697,13 @@
71780C3A2C4577FF0073B731 /* CalendarTargetType.swift in Sources */,
71780C462C4589400073B731 /* NewTokenModel.swift in Sources */,
71F8F9342D281C9200B822F3 /* ScrapRepository.swift in Sources */,
- B871D7372C3EF87B008D78C2 /* NonJobCardCell.swift in Sources */,
7119B8112CA72FBD00E94E62 /* UIColor+.swift in Sources */,
71780C482C458FF80073B731 /* HomeTargetType.swift in Sources */,
2D8CCF0D2D1107F60030E8E5 /* FilteringViewController.swift in Sources */,
71780C3E2C45849A0073B731 /* UserDefaultWrapper.swift in Sources */,
7121A14B2C3B09800056DB8B /* setImage.swift in Sources */,
- B871D7292C3E8E46008D78C2 /* JobCardCell.swift in Sources */,
2D89C74D2C47E8EA002B035F /* ProfileImageViewModel.swift in Sources */,
2DC61EF32C4075E3009F991F /* JobDetailViewController.swift in Sources */,
- 71FFB2BD2C4A186900C60697 /* HomeViewController.swift in Sources */,
715028692C84AA1600F67472 /* LoginRepository.swift in Sources */,
2D4EE3852C3D6E6B00E3E95B /* CustomProgressView.swift in Sources */,
2DC61EF92C407E65009F991F /* JobDetailTableViewHeaderCell.swift in Sources */,
@@ -1789,7 +1733,6 @@
71F8F8702D278BE900B822F3 /* HomeRepository.swift in Sources */,
B871D7232C3E8836008D78C2 /* JobCardModel.swift in Sources */,
2DC985F72C456F7E00D46729 /* AdvertisementCollectionViewCell.swift in Sources */,
- B871D7312C3E9118008D78C2 /* NonScrapInfoCell.swift in Sources */,
71F004C72C957C8C00CD202B /* EmptyView.swift in Sources */,
2D74E5022D1F20250018A56E /* PlanFilteringViewModel.swift in Sources */,
719C6DF02C93DBB7006AF9C9 /* CustomAlertViewController.swift in Sources */,
@@ -1802,7 +1745,6 @@
2D74E4F22D1F10CD0018A56E /* Grade.swift in Sources */,
B8BE0E142C46D38700B3D298 /* UserFilteringInfoModel.swift in Sources */,
71D7E6ED2C2FF42500C54EA7 /* TNTabBarController.swift in Sources */,
- B833F7D22C8EC661006AE46E /* CheckDeadlineCell.swift in Sources */,
2D89C7612C486E12002B035F /* SearchResultViewModel.swift in Sources */,
2DC61F152C41AB54009F991F /* LoginViewController.swift in Sources */,
2D74E4F92D1F1BF20018A56E /* JobFilteringViewModel.swift in Sources */,
@@ -1820,7 +1762,6 @@
2DF257182C8DEF3F00B85843 /* WithdrawViewModel.swift in Sources */,
2DF256F12C8C853F00B85843 /* MyPageProfileViewCell.swift in Sources */,
71461EBD2C3705B6002A6999 /* FontLiterals.swift in Sources */,
- B871D7252C3E8A53008D78C2 /* ScrapInfoHeaderCell.swift in Sources */,
7121A1402C3AB9EE0056DB8B /* JobDetailInfoView.swift in Sources */,
71DE23782C7C67690024ACED /* TNCalendarService.swift in Sources */,
);
@@ -1973,7 +1914,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 2025.0105.1602;
+ CURRENT_PROJECT_VERSION = 2025.0119.1759;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -2017,7 +1958,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 2025.0105.1602;
+ CURRENT_PROJECT_VERSION = 2025.0119.1759;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
diff --git a/Terning-iOS/Terning-iOS/Info.plist b/Terning-iOS/Terning-iOS/Info.plist
index 2fc8afa9..82fc1e36 100644
--- a/Terning-iOS/Terning-iOS/Info.plist
+++ b/Terning-iOS/Terning-iOS/Info.plist
@@ -9,7 +9,7 @@
CFBundleShortVersionString
1.1.0
CFBundleVersion
- 2025.0105.1602
+ 2025.0119.1759
CFBundleName
$(PRODUCT_NAME)
CFBundleURLTypes
diff --git a/Terning-iOS/Terning-iOS/Resource/Amplitude/AmplitudeEventType.swift b/Terning-iOS/Terning-iOS/Resource/Amplitude/AmplitudeEventType.swift
index df011266..2835c0b0 100644
--- a/Terning-iOS/Terning-iOS/Resource/Amplitude/AmplitudeEventType.swift
+++ b/Terning-iOS/Terning-iOS/Resource/Amplitude/AmplitudeEventType.swift
@@ -11,6 +11,7 @@ public enum AmplitudeEventType: String {
// ํ์๊ฐ์
์ด๋ฒคํธ
case signupKakao = "signup_kakao" // ํ์๊ฐ์
_์นด์นด์ค ๋ก๊ทธ์ธ
case signupApple = "signup_apple" // ํ์๊ฐ์
_Apple ๋ก๊ทธ์ธ
+ case skipPlan = "skip_plan" // ๊ฒํ ๋์ค์ ์
๋ ฅํ๊ธฐ
// ์คํ๋์ฌ ์ด๋ฒคํธ
case clickStartService = "click_start_service" // ์คํ๋์ฌ_์๋น์ค ์์ํ๊ธฐ
diff --git a/Terning-iOS/Terning-iOS/Resource/UIComponents/CustomBottmSheetViewController.swift b/Terning-iOS/Terning-iOS/Resource/UIComponents/CustomBottmSheetViewController.swift
deleted file mode 100644
index d499b81c..00000000
--- a/Terning-iOS/Terning-iOS/Resource/UIComponents/CustomBottmSheetViewController.swift
+++ /dev/null
@@ -1,246 +0,0 @@
-//
-// CustomBottmSheetViewController.swift
-// Terning-iOS
-//
-// Created by ์ด๋ช
์ง on 7/17/24.
-//
-
-import UIKit
-import RxSwift
-
-import SnapKit
-import Then
-
-enum BottomSheet: CaseIterable {
- case expand, middle, low, end
-
- var height: Double {
- switch self {
- case .expand:
- return UIScreen.main.bounds.height * 0.86
- case .middle:
- return UIScreen.main.bounds.height * 0.6
- case .low:
- return UIScreen.main.bounds.height * 0.46
- default:
- return 0
- }
- }
-}
-
-final class CustomBottomSheetViewController: UIViewController {
-
- // MARK: - Property
-
- private lazy var screenHeight = UIScreen.main.bounds.height
-
- private var bottomHeight: Double = 380.0
- private var cancelBag = DisposeBag()
-
- private var upScroll: Bool
- private var isNotch: Bool
-
- // MARK: - UIComponents
-
- let contentViewController: UIViewController
-
- private let dimmedView = UIView().then {
- $0.backgroundColor = .black.withAlphaComponent(0.3)
- $0.isUserInteractionEnabled = true
- }
-
- private let notchView = UIView().then {
- $0.backgroundColor = .grey300
- $0.layer.cornerRadius = 2
- $0.isUserInteractionEnabled = true
- }
-
- private var bottomSheetView = UIView().then {
- $0.backgroundColor = .white
- $0.layer.cornerRadius = 15
- $0.clipsToBounds = true
- $0.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
- $0.isUserInteractionEnabled = true
- }
-
- // MARK: - Life Cycles
-
- init(bottomType: BottomSheet, contentViewController: UIViewController = UIViewController(), upScroll: Bool = true, isNotch: Bool = true) {
- self.contentViewController = contentViewController
- self.bottomHeight = bottomType.height
- self.upScroll = upScroll
- self.isNotch = isNotch
-
- super.init(nibName: nil, bundle: nil)
-
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
- setUI()
- setHierarchy()
- setLayout()
- setAddTarget()
- }
-
- override func viewDidAppear(_ animated: Bool) {
- showBottomSheet()
- }
-
- // MARK: - UI & Layout
-
- private func setUI() {
- addChild(contentViewController)
- bottomSheetView.addSubview(contentViewController.view)
- contentViewController.didMove(toParent: self)
- }
-
- private func setHierarchy() {
- view.addSubviews(
- dimmedView,
- bottomSheetView
- )
-
- if isNotch {
- view.addSubview(notchView)
- }
-
- dimmedView.alpha = 0.0
- }
-
- private func setLayout() {
- dimmedView.snp.makeConstraints {
- $0.edges.equalToSuperview()
- }
-
- if isNotch {
- notchView.snp.makeConstraints {
- $0.top.equalTo(bottomSheetView.snp.top).offset(12)
- $0.centerX.equalTo(bottomSheetView.snp.centerX)
- $0.width.equalTo(60)
- $0.height.equalTo(4)
- }
- }
-
- bottomSheetView.snp.makeConstraints {
- $0.horizontalEdges.equalToSuperview()
- $0.bottom.equalToSuperview()
- $0.top.equalTo(view.snp.bottom).offset(0)
- }
-
- contentViewController.view.snp.makeConstraints {
- $0.top.equalTo(view.snp.bottom).offset(-349)
- $0.horizontalEdges.equalToSuperview()
- $0.bottom.equalTo(view.safeAreaLayoutGuide)
- }
- }
-
- // MARK: - Methods
-
- func closeBottomSheet() {
- hideBottomSheetAndGoBack()
- }
-
- private func setAddTarget() {
-
- let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dimmedViewDidTap))
- dimmedView.addGestureRecognizer(tapGesture)
-
- let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(sender:)))
- bottomSheetView.addGestureRecognizer(panGesture)
-
- }
-
- private func showBottomSheet() {
-
- bottomSheetView.snp.remakeConstraints {
- $0.bottom.horizontalEdges.equalToSuperview()
- $0.top.equalToSuperview().inset(screenHeight - bottomHeight)
- }
-
- UIView.animate(withDuration: 0.25, delay: 0, options: .transitionCurlUp) {
- self.dimmedView.alpha = 0.7
- self.view.layoutIfNeeded()
- }
- }
-
- private func hideBottomSheetAndGoBack() {
-
- bottomSheetView.snp.remakeConstraints {
- $0.bottom.horizontalEdges.equalToSuperview()
- $0.top.equalToSuperview().inset(screenHeight)
- }
-
- UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseIn) {
- self.dimmedView.alpha = 0.0
- self.view.layoutIfNeeded()
- } completion: { _ in
- if self.presentingViewController != nil {
- self.dismiss(animated: false, completion: nil)
- }
- }
- }
-
- @objc private func handlePanGesture(sender: UIPanGestureRecognizer) {
- let translation = sender.translation(in: view)
- let velocity = sender.velocity(in: view)
- let currentTop = bottomSheetView.frame.origin.y + translation.y
-
- switch sender.state {
- case .changed:
- // upScrollLimit์ด false์ด๋ฉด ์๋ก ์ฌ๋ฆฌ๋ ๊ฒ์ ์ ํ true ๊ฐ์ด์ฌ์ผ ์ฌ๋ฆด ์ ์์
- if !upScroll && translation.y < 0 {
- return // ์๋ก ์ด๋ํ๋ ์ ์ค์ฒ ์ฐจ๋จ
- }
- // ํ์ฌ ๋ฐํ
์ํธ์ top ์์น๋ฅผ ๊ณ์ฐํ๊ณ , ์ ํ์ ์ผ๋ก ์ด๋ ๊ฐ๋ฅํ๊ฒ ์ค์
- let newTop = max(0, currentTop)
- bottomSheetView.snp.updateConstraints { make in
- make.top.equalToSuperview().inset(newTop)
- }
- sender.setTranslation(CGPoint.zero, in: view)
-
- case .ended, .cancelled:
- // ์ข
๋ฃ ์, ์๋๊ฐ ๋น ๋ฅด๊ณ ์๋๋ก ์ด๋ํ๋ ๊ฒฝ์ฐ ๋ฐํ
์ํธ๋ฅผ ์จ๊น
- if velocity.y > 1500 {
- hideBottomSheetAndGoBack()
- } else {
- if upScroll { // true ์ด๋ฉด ์ค๋
๊ฐ๋ฅ
- snapBottomSheetToNearestPosition()
- } else { // false๋ฉด ๊ทธ๋ฅ ์จ๊ธฐ๊ธฐ๋ก ๋์ด๊ฐ
- hideBottomSheetAndGoBack()
- }
- }
-
- default:
- break
- }
- }
-
- private func snapBottomSheetToNearestPosition() {
- let positions: [Double] = BottomSheet.allCases.map { $0.height }
- let currentTop = screenHeight - bottomSheetView.frame.minY
- let closestPosition = positions.min(by: { abs(currentTop - $0) < abs(currentTop - $1) })!
-
- if closestPosition == 0 {
- hideBottomSheetAndGoBack()
- } else {
- bottomSheetView.snp.updateConstraints { make in
- make.top.equalToSuperview().inset(screenHeight - closestPosition)
- }
-
- UIView.animate(withDuration: 0.25, animations: {
- self.view.layoutIfNeeded()
- })
- }
- }
-
- @objc
- private func dimmedViewDidTap() {
- self.hideBottomSheetAndGoBack()
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Resource/Utils/CompositionalLayout.swift b/Terning-iOS/Terning-iOS/Resource/Utils/CompositionalLayout.swift
index e3a76a39..33d4f978 100644
--- a/Terning-iOS/Terning-iOS/Resource/Utils/CompositionalLayout.swift
+++ b/Terning-iOS/Terning-iOS/Resource/Utils/CompositionalLayout.swift
@@ -107,135 +107,6 @@ struct CompositionalLayout {
}
}
- static func createHomeListLayout(HomeVC: HomeViewController) -> UICollectionViewCompositionalLayout {
- return UICollectionViewCompositionalLayout { (sectionNumber, _) -> NSCollectionLayoutSection? in
-
- // TEST: - HomeViewController์ ์๋ ์ธ์คํด์ค๋ฅผ ์ ๊ฐ์ ธ์ค๋์ง ํ
์คํธ ํ๋ ์ฝ๋
- print("๐๐ปuserName: \(HomeVC.userName)๐๐ป")
- print("๐๐ปexistIsScrapped: \(HomeVC.hasScrapped)๐๐ป")
-
- if sectionNumber == 0 {
- let item = NSCollectionLayoutItem(
- layoutSize: .init(
- widthDimension: .fractionalWidth(1),
- heightDimension: .fractionalHeight(1)
- )
- )
-
- if HomeVC.userName.count > 6 {
- let group = NSCollectionLayoutGroup.horizontal(
- layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .estimated(48)),
- subitems: [item]
- )
-
- let section = NSCollectionLayoutSection(group: group)
- section.contentInsets = .init(top: 0, leading: 0, bottom: 16, trailing: 0)
-
- return section
-
- } else {
- let group = NSCollectionLayoutGroup.horizontal(
- layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .estimated(24)),
- subitems: [item])
-
- let section = NSCollectionLayoutSection(group: group)
- section.contentInsets = .init(top: 0, leading: 0, bottom: 16, trailing: 0)
-
- return section
- }
-
- } else if sectionNumber == 1 {
-
- if HomeVC.upcomingCardLists.isEmpty {
- let itemWidth: CGFloat = 327.adjusted
-
- let item = NSCollectionLayoutItem(
- layoutSize: .init(
- widthDimension: .absolute(itemWidth),
- heightDimension: .fractionalHeight(1)
- )
- )
-
- let groupHeight: CGFloat = 116.adjustedH
-
- let group = NSCollectionLayoutGroup.horizontal(
- layoutSize: .init(
- widthDimension: .fractionalWidth(1.0),
- heightDimension: .absolute(groupHeight)
- ), subitems: [item]
- )
-
- let section = NSCollectionLayoutSection(group: group)
- section.contentInsets = .init(top: 0, leading: 24, bottom: 20, trailing: 0)
-
- return section
-
- } else {
- let itemWidth: CGFloat = 246.adjusted
-
- let item = NSCollectionLayoutItem(
- layoutSize: .init(
- widthDimension: .absolute(itemWidth),
- heightDimension: .fractionalHeight(1)
- )
- )
-
- let groupHeight: CGFloat = 116.adjustedH
-
- let group = NSCollectionLayoutGroup.horizontal(
- layoutSize: .init(
- widthDimension: .estimated(itemWidth),
- heightDimension: .absolute(groupHeight)
- ),
- subitems: [item]
- )
-
- let section = NSCollectionLayoutSection(group: group)
-
- section.contentInsets = .init(top: 0, leading: 24, bottom: 20, trailing: 24)
- section.interGroupSpacing = 20
-
- section.orthogonalScrollingBehavior = .continuous
-
- return section
- }
-
- } else if sectionNumber == 2 {
- let itemSize = NSCollectionLayoutSize(
- widthDimension: .fractionalWidth(1.0),
- heightDimension: .absolute(100.adjustedH))
-
- let item = NSCollectionLayoutItem(layoutSize: itemSize)
-
- // Group
- let groupSize = NSCollectionLayoutSize(
- widthDimension: .fractionalWidth(1.0),
- heightDimension: .absolute(100.adjustedH)) // ํค๋๊ฐ ํฌํจ๋ ์ฌ์ด์ฆ์ฌ์ผํจ.
-
- let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item])
-
- // Section
- let section = NSCollectionLayoutSection(group: group)
-
- let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .absolute(114.adjustedH))
- let sectionHeader = NSCollectionLayoutBoundarySupplementaryItem(
- layoutSize: headerSize,
- elementKind: UICollectionView.elementKindSectionHeader,
- alignment: .top
- )
-
- sectionHeader.pinToVisibleBounds = true
- section.boundarySupplementaryItems = [sectionHeader]
- section.interGroupSpacing = 12
- section.contentInsets = .init(top: 4, leading: 0, bottom: 20, trailing: 0)
-
- return section
- } else {
- return nil
- }
- }
- }
-
static func createRecommendLayout() -> UICollectionViewCompositionalLayout {
return UICollectionViewCompositionalLayout { (sectionNumber, _) -> NSCollectionLayoutSection? in
@@ -306,7 +177,7 @@ struct CompositionalLayout {
}
}
- static func createNewHomeCollectionViewLayout(hasScrapped: Bool, soonData: [AnnouncementModel], userName: String) -> UICollectionViewCompositionalLayout {
+ static func createHomeCollectionViewLayout(hasScrapped: Bool, soonData: [AnnouncementModel], userName: String) -> UICollectionViewCompositionalLayout {
return UICollectionViewCompositionalLayout { (sectionNumber, _) -> NSCollectionLayoutSection? in
if sectionNumber == 0 {
diff --git a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
index 41d8894c..3b20bbc7 100644
--- a/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
+++ b/Terning-iOS/Terning-iOS/Source/Data/Network/Service/AuthInterceptor.swift
@@ -36,7 +36,7 @@ final class AuthInterceptor: RequestInterceptor {
guard let response = request.task?.response as? HTTPURLResponse,
response.statusCode == 401,
let pathComponents = request.request?.url?.pathComponents,
- !pathComponents.contains("getNewToken")
+ !pathComponents.contains("token-reissue")
else {
dump(error)
completion(.doNotRetryWithError(error))
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/ClosingJobAnnouncementCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ClosingJobAnnouncementCell.swift
similarity index 97%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/ClosingJobAnnouncementCell.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ClosingJobAnnouncementCell.swift
index 395ec915..14f8738e 100644
--- a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/ClosingJobAnnouncementCell.swift
+++ b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ClosingJobAnnouncementCell.swift
@@ -10,6 +10,10 @@ import UIKit
import SnapKit
import Then
+protocol UpcomingCardCellProtocol {
+ func upcomingCardDidTap(indexPath: Int)
+}
+
final class ClosingJobAnnouncementCell: UICollectionViewCell {
// MARK: - Properties
@@ -187,6 +191,6 @@ extension ClosingJobAnnouncementCell {
@objc func upcomingCardDidTap() {
guard let internshipAnnouncementId = self.indexPath else { return }
- delegate?.upcomingCardDidTap(index: internshipAnnouncementId)
+ delegate?.upcomingCardDidTap(indexPath: internshipAnnouncementId)
}
}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/FilterInfoCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/FilterInfoCell.swift
deleted file mode 100644
index 0bad19da..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/FilterInfoCell.swift
+++ /dev/null
@@ -1,274 +0,0 @@
-//
-// FilterInfoCell.swift
-// Terning-iOS
-//
-// Created by ์ด๋ช
์ง on 7/19/24.
-//
-
-import UIKit
-
-import SnapKit
-import Then
-
-protocol FilterButtonProtocol: AnyObject {
- func filterButtonDidTap()
-}
-
-protocol SortButtonProtocol: AnyObject {
- func sortButtonTap()
-}
-
-final class FilterInfoCell: UICollectionViewCell {
-
- // MARK: - Properties
-
- private let sortSettingVC = SortSettingViewController()
- var totalCount: Int = 999999
-
- private var isFilterButtonSelected = false
- private var originalBackgroundColor: UIColor?
-
- weak var filterDelegate: FilterButtonProtocol?
- weak var sortDelegate: SortButtonProtocol?
-
- // MARK: - UIComponents
-
- private let titleLabel = LabelFactory.build(
- text: "๋ด ๊ณํ์ ๋ฑ ๋ง๋ ๋ํ์ ์ธํด ๊ณต๊ณ ",
- font: .title1,
- textColor: .terningBlack,
- textAlignment: .left
- )
-
- // ํํฐ๋ง ๋ฒํผ ๋ฐ ํํฐ๋ง ์ํ ํ์ ๋ฐ
- private lazy var filterButton = FilterButton()
-
- var gradeLabel = LabelFactory.build(
- text: "3ํ๋
",
- font: .body5,
- textColor: .grey400,
- lineSpacing: 1.2,
- characterSpacing: 0.002
-
- )
-
- var periodLabel = LabelFactory.build(
- text: "1~3๊ฐ์",
- font: .body5,
- textColor: .grey400,
- lineSpacing: 1.2,
- characterSpacing: 0.002
-
- )
-
- var monthLabel = LabelFactory.build(
- text: "2024๋
1์",
- font: .body5,
- textColor: .grey400,
- lineSpacing: 1.2,
- characterSpacing: 0.002
- )
-
- private let distinction1 = UIImageView().then {
- $0.image = UIImage(resource: .icDistinction)
- }
-
- private let distinction2 = UIImageView().then {
- $0.image = UIImage(resource: .icDistinction)
- }
-
- // ํํฐ๋ง ์ ๋ณด๊ฐ ์กด์ฌํ ๋
- private lazy var filteringStack = UIStackView(
- arrangedSubviews: [
- gradeLabel,
- distinction1,
- periodLabel,
- distinction2,
- monthLabel
- ]
- ).then {
- $0.axis = .horizontal
- $0.spacing = 6
- $0.distribution = .equalSpacing
- $0.alignment = .center
- }
-
- // ํํฐ๋ง ์ ๋ณด๊ฐ ์์ ๋
- let nonFilteringLabel = LabelFactory.build(
- text: "์ค์ ๋ ํํฐ๋ง ์ ๋ณด๊ฐ ์์ด์",
- font: .body5,
- textColor: .grey400
- )
-
- // ๊ณต๊ณ ๊ฐ์ ์๋ ค์ฃผ๋ ๋ผ๋ฒจ
- lazy var totalCountLabel = LabelFactory.build(
- text: "์ด \(totalCount)๊ฐ์ ๊ณต๊ณ ๊ฐ ์์ด์",
- font: .body3,
- textColor: .grey400
- )
-
- // ์ ๋ ฌ ๋ฒํผ
- var sortButtonLabel = LabelFactory.build(
- text: "์ฑ์ฉ ๋ง๊ฐ ์ด๋ฅธ ์",
- font: .button3
- ).then {
- $0.isUserInteractionEnabled = true
- }
-
- var sortButtonIcon = UIImageView().then {
- $0.image = UIImage(resource: .icDownArrow)
- }
-
- lazy var sortButtonStack = UIStackView(
- arrangedSubviews: [
- sortButtonLabel,
- sortButtonIcon
- ]
- ).then {
- $0.axis = .horizontal
- $0.spacing = 4
- $0.alignment = .center
- $0.isUserInteractionEnabled = true
- }
-
- // MARK: - LifeCycles
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- setHierarchy()
- setLayout()
- setAddTarget()
- setTapGesture()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
-
-// MARK: - UI & Layout
-
-extension FilterInfoCell {
- func setHierarchy() {
- addSubviews(
- titleLabel,
- filterButton,
- filteringStack,
- nonFilteringLabel,
- totalCountLabel,
- sortButtonStack
- )
- }
-
- func setLayout() {
- titleLabel.snp.makeConstraints {
- $0.top.equalToSuperview()
- $0.leading.equalToSuperview().offset(24)
- }
-
- filterButton.snp.makeConstraints {
- $0.top.equalTo(titleLabel.snp.bottom).offset(12)
- $0.leading.equalToSuperview().offset(24)
- }
-
- filteringStack.snp.makeConstraints {
- $0.top.equalTo(titleLabel.snp.bottom).offset(19)
- $0.trailing.equalToSuperview().inset(24)
- $0.width.equalTo(196.adjusted)
- }
-
- nonFilteringLabel.snp.makeConstraints {
- $0.top.equalTo(titleLabel.snp.bottom).offset(19)
- $0.trailing.equalToSuperview().inset(24)
- }
-
- filterButton.snp.makeConstraints {
- $0.height.equalTo(30.adjustedH)
- $0.width.equalTo(80.adjusted)
- }
-
- distinction1.snp.makeConstraints {
- $0.height.equalTo(4.adjustedH)
- $0.width.equalTo(4.adjusted)
- }
-
- distinction2.snp.makeConstraints {
- $0.height.equalTo(4.adjustedH)
- $0.width.equalTo(4.adjusted)
- }
-
- totalCountLabel.snp.makeConstraints {
- $0.top.equalTo(filteringStack.snp.bottom).offset(29.adjustedH)
- $0.leading.equalToSuperview().offset(26.adjusted)
- }
-
- sortButtonStack.snp.makeConstraints {
- $0.top.equalTo(filteringStack.snp.bottom).offset(30.adjustedH)
- $0.trailing.equalToSuperview().inset(16.adjusted)
- }
- }
-
- func setAddTarget() {
- filterButton.addTarget(self, action: #selector(filterButtonDidTap), for: .touchUpInside)
- }
-
- func setTapGesture() {
- let sortTapGesture = UITapGestureRecognizer(target: self, action: #selector(sortButtonDidTap))
- sortButtonStack.addGestureRecognizer(sortTapGesture)
- }
-
- @objc func filterButtonDidTap() {
- print("filterButton is clicked")
- filterDelegate?.filterButtonDidTap()
- }
-
- @objc func sortButtonDidTap() {
- print("sortButton is clicked")
- sortDelegate?.sortButtonTap()
- }
-}
-
-extension FilterInfoCell {
- func bind(model: UserFilteringInfoModel) {
- guard let grade = model.grade,
- let workingPeriod = model.workingPeriod,
- let startYear = model.startYear,
- let startMonth = model.startMonth else {
- filteringStack.isHidden = true
- nonFilteringLabel.isHidden = false
- return
- }
-
- gradeLabel.text = gradeText(for: grade)
- periodLabel.text = periodText(for: workingPeriod)
- monthLabel.text = "\(startYear)๋
\(startMonth)์"
-
- filteringStack.isHidden = false
- nonFilteringLabel.isHidden = true
- }
-
- func countBind(model: JobCardModel) {
- totalCountLabel.text = "์ด \(model.totalCount)๊ฐ์ ๊ณต๊ณ ๊ฐ ์์ด์"
- totalCountLabel.setAttributedText(targetFontList: ["\(model.totalCount)": .button3], targetColorList: ["\(model.totalCount)": .terningMain])
- }
-
- private func gradeText(for grade: String) -> String {
- switch grade {
- case "freshman": return "1ํ๋
"
- case "sophomore": return "2ํ๋
"
- case "junior": return "3ํ๋
"
- case "senior": return "4ํ๋
"
- default: return "-"
- }
- }
-
- private func periodText(for period: String) -> String {
- switch period {
- case "short": return "1~3๊ฐ์"
- case "middle": return "4~6๊ฐ์"
- case "long": return "7๊ฐ์ ์ด์"
- default: return "-"
- }
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/HomeTopCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/HomeTopCell.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/HomeTopCell.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/HomeTopCell.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/IsScrapInfoViewCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/IsScrapInfoViewCell.swift
deleted file mode 100644
index 84751516..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/IsScrapInfoViewCell.swift
+++ /dev/null
@@ -1,197 +0,0 @@
-//
-// IsScrapInfoViewCell.swift
-// Terning-iOS
-//
-// Created by ๊น๋ฏผ์ฑ on 7/10/24.
-//
-
-import UIKit
-
-import SnapKit
-import Then
-
-protocol UpcomingCardCellProtocol {
- func upcomingCardDidTap(index: Int)
-}
-
-final class IsScrapInfoViewCell: UICollectionViewCell {
-
- // MARK: - Properties
-
- var upcomingCardDelegate: UpcomingCardCellProtocol?
-
- private var indexPath: Int?
-
- private var internshipAnnouncementId: Int = 1
- private var isScrapped: Bool = false
- private var companyImage: String = ""
- private var dDay = "D-day"
- private var deadline = "2024๋
7์ 14์ผ"
- private var workingPeriod = "2๊ฐ์"
- private var startYearMonth = "2025๋
10์"
-
- // MARK: - UIComponents
-
- private let scrapAndDeadlineCard = UIView().then {
- $0.layer.cornerRadius = 5
- $0.backgroundColor = .white
- $0.layer.applyShadow(color: .greyShadow, alpha: 1.0, y: 0, blur: 4)
- $0.isUserInteractionEnabled = true
- }
-
- private let colorMark = UIView().then {
- $0.backgroundColor = .black
- $0.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner]
- $0.makeBorder(width: 0, color: .clear, cornerRadius: 5)
- $0.clipsToBounds = true
- }
-
- private let cardLabel = LabelFactory.build(
- text: "[์ ํํด๋ฒ๋ฆฌ] ๊ทธ๋ฆฐ์บ ํ w.๋ํ์ ์ฒํ๋๊ฐ ๋ชจ์ง3",
- font: .button3,
- textAlignment: .left
- ).then {
- $0.numberOfLines = 2
- $0.isUserInteractionEnabled = true
- }
-
- private let companyImageView = UIImageView().then {
- $0.image = UIImage(resource: .default)
- $0.contentMode = .scaleAspectFit
- $0.clipsToBounds = true
- $0.makeBorder(width: 1, color: .grey150, cornerRadius: 32/2)
- }
-
- private var companyName = LabelFactory.build(
- text: "๊ธฐ์
์ด๋ฆ",
- font: .button5,
- textColor: .grey400,
- textAlignment: .left
- )
-
- private lazy var companyLabelStack = UIStackView(
- arrangedSubviews: [
- companyImageView,
- companyName
- ]
- ).then {
- $0.axis = .horizontal
- $0.spacing = 6
- $0.distribution = .equalSpacing
- $0.alignment = .center
- }
-
- private var dDayLabel = LabelFactory.build(
- text: "D-0",
- font: .body4,
- textColor: .terningMain
- )
-
- private var dDayView = UIView().then {
- $0.backgroundColor = .terningSub3
- $0.layer.cornerRadius = 5
- }
-
- // MARK: - LifeCycles
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- setHierarchy()
- setLayout()
- setTapGesture()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
-
-// MARK: - UI & Layout
-
-extension IsScrapInfoViewCell {
- private func setHierarchy() {
- contentView.addSubviews(
- scrapAndDeadlineCard,
- colorMark,
- cardLabel,
- companyLabelStack,
- dDayView,
- dDayLabel
- )
- }
-
- private func setLayout() {
- scrapAndDeadlineCard.snp.makeConstraints {
- $0.verticalEdges.equalToSuperview()
- $0.trailing.equalToSuperview()
- $0.leading.equalToSuperview()
- }
-
- colorMark.snp.makeConstraints {
- $0.verticalEdges.equalTo(scrapAndDeadlineCard)
- $0.leading.equalTo(scrapAndDeadlineCard)
- $0.width.equalTo(8.adjusted)
- }
-
- cardLabel.snp.makeConstraints {
- $0.top.equalTo(scrapAndDeadlineCard.snp.top).offset(16)
- $0.leading.equalTo(colorMark.snp.trailing).offset(12)
- $0.width.equalTo(214.adjusted)
- }
-
- companyLabelStack.snp.makeConstraints {
- $0.top.equalTo(scrapAndDeadlineCard.snp.top).inset(72)
- $0.leading.equalTo(colorMark.snp.trailing).offset(12)
- }
-
- companyImageView.snp.makeConstraints {
- $0.height.width.equalTo(32.adjustedH)
- }
-
- dDayView.snp.makeConstraints {
- $0.top.equalTo(scrapAndDeadlineCard.snp.top).inset(78)
- $0.trailing.equalTo(scrapAndDeadlineCard.snp.trailing).inset(12)
- $0.height.equalTo(20.adjustedH)
- $0.width.equalTo(52.adjusted)
- }
-
- dDayLabel.snp.makeConstraints {
- $0.centerX.equalTo(dDayView)
- $0.centerY.equalTo(dDayView)
- }
- }
-
- func setTapGesture() {
- let upcomingCardTapGesture = UITapGestureRecognizer(target: self, action: #selector(upcomingCardDidTap))
- scrapAndDeadlineCard.addGestureRecognizer(upcomingCardTapGesture)
- }
-
- // MARK: - Methods
-
- func bindData(model: AnnouncementModel, indexPath: IndexPath) {
- guard let color = model.color else { return }
-
- self.companyImageView.setImage(with: model.companyImage, placeholder: "placeholder_image")
- self.dDayLabel.text = model.dDay
- self.cardLabel.text = model.title
- self.colorMark.backgroundColor = UIColor(hex: color)
- self.companyName.text = model.companyInfo
- self.internshipAnnouncementId = model.internshipAnnouncementId
- self.companyImage = model.companyImage
- self.dDay = model.dDay
- self.workingPeriod = model.workingPeriod
- self.isScrapped = model.isScrapped
- self.deadline = model.deadline
- self.startYearMonth = model.startYearMonth
- self.indexPath = indexPath.item
- }
-
- // MARK: - objc fund
-
- @objc func upcomingCardDidTap() {
- guard let internshipAnnouncementId = self.indexPath else { return }
-
- upcomingCardDelegate?.upcomingCardDidTap(index: internshipAnnouncementId)
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/NonJobCardCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/NonJobCardCell.swift
deleted file mode 100644
index 28831225..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/NonJobCardCell.swift
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// NonJobCardCell.swift
-// Terning-iOS
-//
-// Created by ๊น๋ฏผ์ฑ on 7/11/24.
-//
-
-import UIKit
-
-import SnapKit
-import Then
-
-final class NonJobCardCell: UICollectionViewCell {
-
- // MARK: - UIComponents
-
- private let InfoImage = UIImageView().then {
- $0.image = .imgNonCardViewInfo
- }
-
- private let descriptionLabel = LabelFactory.build(
- text: "์ง๊ธ ๊ณต๊ณ ํํฐ๋ง์ ์ค์ ํ๊ณ \n ๋ด ๊ณํ์ ๋ฑ ๋ง๋ ๋ํ์ ์ธํด ๊ณต๊ณ ๋ฅผ ์ถ์ฒ๋ฐ์๋ณด์ธ์!",
- font: .detail2,
- textColor: .grey400
- ).then {
- $0.numberOfLines = 2
- }
-
- lazy var emptyStackView = UIStackView(
- arrangedSubviews: [
- InfoImage,
- descriptionLabel
- ]
- ).then {
- $0.axis = .vertical
- $0.spacing = 20
- $0.alignment = .center
- $0.distribution = .fillProportionally
- }
-
- // MARK: - LifeCycles
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- setHierarchy()
- setLayout()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
-
-// MARK: - UI & Layout
-
-extension NonJobCardCell {
- private func setHierarchy() {
- contentView.addSubviews(
- InfoImage,
- descriptionLabel
- )
- }
-
- private func setLayout() {
- InfoImage.snp.makeConstraints {
- $0.top.equalToSuperview()
- $0.centerX.equalToSuperview()
- $0.height.equalTo(222.adjustedH)
- $0.width.equalTo(327.adjusted)
- }
-
- descriptionLabel.snp.makeConstraints {
- $0.top.equalTo(InfoImage.snp.bottom).offset(20)
- $0.centerX.equalToSuperview()
- }
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ScrapInfoHeaderCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ScrapInfoHeaderCell.swift
deleted file mode 100644
index f7041d8b..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/ScrapInfoHeaderCell.swift
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// ScrapInfoHeaderCell.swift
-// Terning-iOS
-//
-// Created by ๊น๋ฏผ์ฑ on 7/10/24.
-//
-
-import UIKit
-
-import SnapKit
-import Then
-
-final class ScrapInfoHeaderCell: UICollectionViewCell {
-
- // MARK: - UIComponents
-
- private let titleLabel = LabelFactory.build(
- text: "๊ณง ๋ง๊ฐ๋๋ ํ์๋์ ๊ด์ฌ ๊ณต๊ณ ",
- font: .title1,
- textColor: .terningBlack,
- textAlignment: .left
- ).then {
- $0.numberOfLines = 0
- }
-
- // MARK: - LifeCycles
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- setHierarchy()
- setLayout()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
-
-// MARK: - UI & Layout
-
-extension ScrapInfoHeaderCell {
-
- private func setHierarchy() {
- addSubview(titleLabel)
- }
-
- private func setLayout() {
- titleLabel.snp.makeConstraints {
- $0.top.equalToSuperview()
- $0.leading.equalToSuperview().offset(24)
- }
- }
-}
-
-// MARK: - Methods
-
-extension ScrapInfoHeaderCell {
- func bind(name: String) {
- if name.count > 6 {
- titleLabel.text = "\(name)๋์๊ฒ \n๋ฑ ๋ง๋ ๋ํ์ ์ธํด ๊ณต๊ณ "
- } else {
- titleLabel.text = "\(name)๋์๊ฒ ๋ฑ ๋ง๋ ๋ํ์ ์ธํด ๊ณต๊ณ "
- }
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/StickyHeaderCell.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/StickyHeaderCell.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/Cell/StickyHeaderCell.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/Cell/StickyHeaderCell.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeView.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeView.swift
deleted file mode 100644
index bdfc2d03..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeView.swift
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// HomeView.swift
-// Terning-iOS
-//
-// Created by ์ด๋ช
์ง on 7/19/24.
-//
-
-import UIKit
-
-import SnapKit
-import Then
-
-final class HomeView: UIView {
-
- // MARK: - Properties
-
- private weak var homeViewController: HomeViewController?
-
- // MARK: - UIComponents
-
- lazy var collectionView: UICollectionView = {
- guard let homeVC = homeViewController else {
- fatalError("homeViewController๊ฐ ์์ต๋๋ค.")
- }
- let layout = CompositionalLayout.createHomeListLayout(HomeVC: homeVC)
- let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
-
- collectionView.isScrollEnabled = true
- collectionView.backgroundColor = .clear
- collectionView.showsVerticalScrollIndicator = false
-
- return collectionView
- }()
-
- private let homeLogoView = UIView().then {
- $0.backgroundColor = .white
- }
- private let homeLogoImage = UIImageView().then {
- $0.image = UIImage(resource: .homeLogo)
- }
-
- let gradientLayerView = GradientLayerView()
-
- // MARK: - Life Cycles
-
- init(frame: CGRect, homeViewController: HomeViewController) {
- self.homeViewController = homeViewController
- super.init(frame: frame)
-
- setUI()
- setHierarchy()
- setLayout()
- }
-
- @available(*, unavailable)
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
-}
-
-// MARK: - UI & Layout
-
-extension HomeView {
- private func setUI() {
- gradientLayerView.isHidden = true
- }
-
- private func setHierarchy() {
- addSubviews(
- homeLogoView,
- collectionView,
- gradientLayerView
- )
-
- homeLogoView.addSubview(homeLogoImage)
- }
-
- private func setLayout() {
- homeLogoView.snp.makeConstraints {
- $0.top.equalTo(safeAreaLayoutGuide)
- $0.horizontalEdges.equalToSuperview()
- $0.height.equalTo(52.adjustedH)
- }
-
- homeLogoImage.snp.makeConstraints {
- $0.leading.equalToSuperview().offset(24.adjusted)
- $0.centerY.equalToSuperview()
- }
-
- collectionView.snp.makeConstraints {
- $0.top.equalTo(homeLogoImage.snp.bottom)
- $0.horizontalEdges.equalToSuperview()
- $0.bottom.equalTo(safeAreaLayoutGuide)
- }
-
- gradientLayerView.snp.makeConstraints {
- $0.top.equalToSuperview().offset(215.adjustedH)
- $0.horizontalEdges.equalToSuperview()
- $0.height.equalTo(43.adjustedH)
- }
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeViewController.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeViewController.swift
deleted file mode 100644
index ef513a65..00000000
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Home/HomeViewController.swift
+++ /dev/null
@@ -1,707 +0,0 @@
-//
-// HomeViewController.swift
-// Terning-iOS
-//
-// Created by ์ด๋ช
์ง on 7/19/24.
-//
-
-import Foundation
-
-import UIKit
-import Then
-
-enum HomeMainSection: Int, CaseIterable {
- case todayDeadlineUserInfo
- case todayDeadline
- case jobCard
-
- var numberOfItemsInSection: Int {
- switch self {
- case .todayDeadlineUserInfo:
- return 1
- case .todayDeadline, .jobCard:
- return 0
- }
- }
-}
-
-final class HomeViewController: UIViewController {
-
- // MARK: - Properties
-
- private let myPageProvider = Providers.myPageProvider
- private let homeProviders = Providers.homeProvider
- private let filterProviders = Providers.filtersProvider
- private let scrapProviders = Providers.scrapsProvider
-
- var apiParameter: String = "deadlineSoon"
-
- var userName: String = ""
- var hasScrapped: Bool = false
- var upcomingCardLists: [AnnouncementModel] = [] {
- didSet {
- rootView.collectionView.reloadData()
- }
- }
-
- var filterInfos: UserFilteringInfoModel = UserFilteringInfoModel(
- grade: nil, // ๊ธฐ๋ณธ๊ฐ ์ค์
- workingPeriod: nil, // ๊ธฐ๋ณธ๊ฐ ์ค์
- startYear: nil, // ๊ธฐ๋ณธ๊ฐ ์ค์
- startMonth: nil, // ๊ธฐ๋ณธ๊ฐ ์ค์
- jobType: nil
- )
-
- private var jobCardTotalCount: JobCardModel = JobCardModel(totalCount: 0, result: [])
-
- private var jobCardLists: [AnnouncementModel] = [] {
- didSet {
- print("๐\(jobCardLists)๐")
- rootView.collectionView.reloadData()
- }
- }
-
- private var isNoneData: Bool {
- return filterInfos.grade == nil || filterInfos.workingPeriod == nil ||
- filterInfos.startYear == nil || filterInfos.startMonth == nil
- }
-
- // MARK: - UIComponents
-
- private lazy var rootView = HomeView(frame: .zero, homeViewController: self)
-
- // MARK: - Life Cycles
-
- override func loadView() {
- self.view = rootView
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
- setUI()
- setDelegate()
- setRegister()
- fetchFilterInfos()
- }
-
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(true)
-
- getMyPageInfo()
- fetchFilterInfos()
- resetSortOption()
- }
-
- // MARK: - UI & Layout
-
- private func setUI() {
- view.backgroundColor = .white
- }
-
- private func setDelegate() {
- rootView.collectionView.delegate = self
- rootView.collectionView.dataSource = self
- }
-
- private func setRegister() {
- // ๋ง๊ฐ ๊ณต๊ณ ํ์ดํ
- rootView.collectionView.register(ScrapInfoHeaderCell.self, forCellWithReuseIdentifier: ScrapInfoHeaderCell.className)
-
- // ๊ณง ๋ง๊ฐ์ธ ๊ณต๊ณ ์นด๋ ์
- rootView.collectionView.register(NonScrapInfoCell.self, forCellWithReuseIdentifier: NonScrapInfoCell.className)
- rootView.collectionView.register(CheckDeadlineCell.self, forCellWithReuseIdentifier: CheckDeadlineCell.className)
- rootView.collectionView.register(IsScrapInfoViewCell.self, forCellWithReuseIdentifier: IsScrapInfoViewCell.className)
-
- // ํํฐ๋ง ์
- rootView.collectionView.register(FilterInfoCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: FilterInfoCell.className)
-
- // ๋ฑ ๋ง๋ ๋ํ์ ์ธํด๊ณต๊ณ ์
- rootView.collectionView.register(JobCardCell.self, forCellWithReuseIdentifier: JobCardCell.className) // ๋ง์ถค ๊ณต๊ณ ๊ฐ ์๋ ๊ฒฝ์ฐ
- rootView.collectionView.register(NonJobCardCell.self, forCellWithReuseIdentifier: NonJobCardCell.className)
- rootView.collectionView.register(UnavailableFilterView.self, forCellWithReuseIdentifier: UnavailableFilterView.className)
- }
-
- // MARK: - private func
-
- private func resetSortOption() {
- UserDefaults.standard.removeObject(forKey: "SelectedSortOption")
- UserDefaults.standard.set(SortingOptions.deadlineSoon.rawValue, forKey: "SelectedSortOption")
- }
-}
-
-// MARK: - Extensions
-
-extension HomeViewController: UICollectionViewDelegate {
- func scrollViewDidScroll(_ scrollView: UIScrollView) {
- let offsetY = rootView.collectionView.contentOffset.y
- let stickyAttributes = 220.6
-
- if offsetY >= stickyAttributes {
- rootView.gradientLayerView.isHidden = false
- } else {
- rootView.gradientLayerView.isHidden = true
- }
- }
-
- func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
- guard let section = HomeMainSection(rawValue: indexPath.section) else {
- return
- }
-
- switch section {
- case .jobCard:
- print(indexPath)
- track(eventName: .clickHomeInternCard) // ํ ๊ณต๊ณ ์นด๋ ํด๋ฆญ
- let jobDetailVC = JobDetailViewController(
- viewModel: JobDetailViewModel(
- jobDetailRepository: JobDetailRepository(
- scrapService: ScrapsService(
- provider: Providers.scrapsProvider
- )
- )
- )
- )
- let index = jobCardLists[indexPath.row].internshipAnnouncementId
- jobDetailVC.internshipAnnouncementId.accept(index)
- jobDetailVC.hidesBottomBarWhenPushed = true
- self.navigationController?.pushViewController(jobDetailVC, animated: true)
- default:
- return
- }
- }
-}
-
-extension HomeViewController: UICollectionViewDataSource {
- func numberOfSections(in collectionView: UICollectionView) -> Int {
- return HomeMainSection.allCases.count
- }
-
- func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
- let section = HomeMainSection(rawValue: indexPath.section)
-
- switch section {
- case .jobCard:
- guard let headerView = collectionView.dequeueReusableSupplementaryView(
- ofKind: kind,
- withReuseIdentifier: FilterInfoCell.className,
- for: indexPath
- ) as? FilterInfoCell else {
- return UICollectionReusableView()
- }
-
- headerView.backgroundColor = .white
- headerView.filterDelegate = self
- headerView.sortDelegate = self
- headerView.bind(model: filterInfos)
- headerView.countBind(model: jobCardTotalCount)
-
- return headerView
-
- default:
- return UICollectionReusableView()
- }
- }
-
- func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
- guard let section = HomeMainSection(rawValue: section) else {
- return 0
- }
-
- switch section {
- case .todayDeadlineUserInfo:
- return section.numberOfItemsInSection
- case .todayDeadline:
- return upcomingCardLists.isEmpty ? 1 : upcomingCardLists.count
- case .jobCard:
- return (isNoneData || jobCardLists.isEmpty) ? 1 : jobCardLists.count
- }
- }
-
- func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
- guard let section = HomeMainSection(rawValue: indexPath.section) else {
- fatalError("Section ์ค๋ฅ")
- }
-
- switch section {
- case .todayDeadlineUserInfo:
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: ScrapInfoHeaderCell.className, for: indexPath) as? ScrapInfoHeaderCell else { return UICollectionViewCell() }
- cell.bind(name: userName)
- return cell
-
- case .todayDeadline:
- if hasScrapped {
- if upcomingCardLists.isEmpty {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: CheckDeadlineCell.className, for: indexPath) as? CheckDeadlineCell else { return UICollectionViewCell() } // ์ผ์ฃผ์ผ ๋ด์ ๋ง๊ฐ์ธ ๊ณต๊ณ ๊ฐ ์์ด์ \n ์บ๋ฆฐ๋์์ ์คํฌ๋ฉํ ๊ณต๊ณ ์ผ์ ์ ํ์ธํด ๋ณด์ธ์
- cell.checkDeadlineDelegate = self
- return cell
- } else {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: IsScrapInfoViewCell.className, for: indexPath) as? IsScrapInfoViewCell else { return UICollectionViewCell() }
- cell.upcomingCardDelegate = self
- cell.bindData(model: upcomingCardLists[indexPath.item], indexPath: indexPath)
- return cell
- }
- } else {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: NonScrapInfoCell.className, for: indexPath) as? NonScrapInfoCell else { return UICollectionViewCell() } // ์์ง ์คํฌ๋ฉ๋ ์ธํด ๊ณต๊ณ ๊ฐ ์์ด์!
- return cell
- }
-
- case .jobCard:
- if isNoneData && jobCardLists.isEmpty {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: NonJobCardCell.className, for: indexPath) as? NonJobCardCell else { return UICollectionViewCell() }
- return cell
-
- } else if !isNoneData && jobCardLists.isEmpty {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: UnavailableFilterView.className, for: indexPath) as? UnavailableFilterView else { return UICollectionViewCell() }
- return cell
-
- } else if !isNoneData && !jobCardLists.isEmpty {
- guard let cell = rootView.collectionView.dequeueReusableCell(withReuseIdentifier: JobCardCell.className, for: indexPath) as? JobCardCell else { return UICollectionViewCell() }
- cell.delegate = self
- cell.bind(model: jobCardLists[indexPath.row], indexPath: indexPath)
- return cell
- }
- }
- return UICollectionViewCell()
- }
-}
-
-// MARK: - FilterButtonProtocol
-
-extension HomeViewController: FilterButtonProtocol {
- func filterButtonDidTap() {
- let filterSettingVC = FilteringViewController(
- viewModel: FilteringViewModel(
- filtersRepository: FiltersRepository(
- filtersService: FiltersService(
- provider: Providers.filtersProvider
- )
- )
- ), data: filterInfos
- )
-
- let fraction = UISheetPresentationController.Detent.custom { _ in self.view.frame.height * ((637-32)/812) }
-
- if let sheet = filterSettingVC.sheetPresentationController {
- sheet.detents = [fraction]
- sheet.largestUndimmedDetentIdentifier = nil
- filterSettingVC.modalPresentationStyle = .custom
-
- // ๋ฐํ
์ํธ ๋ท ๋ฐฐ๊ฒฝ ์์ ์ค์
- if let presentingView = self.view {
- let dimmedBackgroundView = UIView(frame: presentingView.bounds)
- dimmedBackgroundView.backgroundColor = UIColor(white: 0, alpha: 0.3)
- dimmedBackgroundView.tag = 999 // ๋์ค์ ์ฝ๊ฒ ์ฐพ๊ธฐ ์ํด ํ๊ทธ ์ค์
- presentingView.addSubview(dimmedBackgroundView)
- presentingView.bringSubviewToFront(filterSettingVC.view)
- }
-
- // ๋ฐํ
์ํธ๊ฐ ์ฌ๋ผ์ง ๋ ๋ฐฐ๊ฒฝ์ ์ ๊ฑฐํ๋ ์ฝ๋ ์ถ๊ฐ
- filterSettingVC.presentationController?.delegate = self
- }
-
- track(eventName: .clickHomeFiltering)
-
- self.present(filterSettingVC, animated: true)
- }
-}
-
-// UIAdaptivePresentationControllerDelegate๋ฅผ ๊ตฌํํ์ฌ ๋ฐํ
์ํธ๊ฐ ์ฌ๋ผ์ง ๋ ํธ์ถ๋๋ ๋ฉ์๋ ์ถ๊ฐ
-extension HomeViewController: UIAdaptivePresentationControllerDelegate {
- func removeDimmedBackgroundView() {
- if let presentingView = self.view,
- let dimmedBackgroundView = presentingView.viewWithTag(999) {
- UIView.animate(withDuration: 0.3) {
- dimmedBackgroundView.alpha = 0
- } completion: { _ in
- dimmedBackgroundView.removeFromSuperview()
- }
- }
- }
-
- func presentationControllerWillDismiss(_ presentationController: UIPresentationController) {
- removeDimmedBackgroundView()
- }
-}
-
-// MARK: - SaveButtonDelegate
-
-extension HomeViewController: SaveButtonProtocol {
- func didSaveSetting() {
- removeDimmedBackgroundView()
- track(eventName: .clickHomeFilteringSave)
- fetchFilterInfos()
- }
-}
-
-// MARK: - SortButtonDelegate
-
-extension HomeViewController: SortButtonProtocol {
- func sortButtonTap() {
- let sortSettingVC = SortSettingViewController()
- sortSettingVC.sortSettingDelegate = self
-
- let fraction = UISheetPresentationController.Detent.custom { _ in self.view.frame.height * ((380-32)/812) }
-
- if let sheet = sortSettingVC.sheetPresentationController {
- sheet.detents = [fraction]
- sheet.largestUndimmedDetentIdentifier = nil
- sortSettingVC.modalPresentationStyle = .custom
-
- // ๋ฐํ
์ํธ ๋ท ๋ฐฐ๊ฒฝ ์์ ์ค์
- if let presentingView = self.view {
- let dimmedBackgroundView = UIView(frame: presentingView.bounds)
- dimmedBackgroundView.backgroundColor = UIColor(white: 0, alpha: 0.3)
- dimmedBackgroundView.tag = 999 // ๋์ค์ ์ฝ๊ฒ ์ฐพ๊ธฐ ์ํด ํ๊ทธ ์ค์
- presentingView.addSubview(dimmedBackgroundView)
- presentingView.bringSubviewToFront(sortSettingVC.view)
- }
-
- // ๋ฐํ
์ํธ๊ฐ ์ฌ๋ผ์ง ๋ ๋ฐฐ๊ฒฝ์ ์ ๊ฑฐํ๋ ์ฝ๋ ์ถ๊ฐ
- sortSettingVC.presentationController?.delegate = self
- }
-
- self.present(sortSettingVC, animated: true)
- }
-}
-
-// MARK: - SortSettingButtonDelegate
-
-extension HomeViewController: SortSettingButtonProtocol {
- func didSelectSortingOption(_ option: SortingOptions) {
- guard let headerView = rootView.collectionView.supplementaryView(
- forElementKind: UICollectionView.elementKindSectionHeader,
- at: IndexPath(row: 0, section: HomeMainSection.jobCard.rawValue)
- ) as? FilterInfoCell else { return }
- headerView.sortButtonLabel.text = option.title
- rootView.collectionView.reloadData()
-
- switch option {
- case .deadlineSoon:
- apiParameter = "deadlineSoon"
- track(eventName: .clickFilteredDeadline)
- case .shortestDuration:
- apiParameter = "shortestDuration"
- track(eventName: .clickFilteredShortTerm)
- case .longestDuration:
- apiParameter = "longestDuration"
- track(eventName: .clickFilteredLongTerm)
- case .mostScrapped:
- apiParameter = "mostScrapped"
- track(eventName: .clickFilteredScraps)
- case .mostViewed:
- apiParameter = "mostViewed"
- track(eventName: .clickFilteredHits)
- }
-
- fetchJobCardDatas(apiParameter)
- removeDimmedBackgroundView()
- }
-}
-
-// MARK: - CheckDeadlineButtonDidTapDelegate
-
-extension HomeViewController: CheckDeadlineCellProtocol {
- func checkDeadlineButtonDidTap() {
- track(eventName: .clickCheckSchedule)
- self.tabBarController?.selectedIndex = 1
- }
-}
-
-// MARK: - ScrapButtonDidTapDelegate
-
-extension HomeViewController: JobCardScrapedCellProtocol {
- func scrapButtonDidTap(index: Int) {
-
- track(eventName: .clickHomeScrap)
-
- let model = jobCardLists[index]
-
- if model.isScrapped {
- let alertSheet = CustomAlertViewController(alertViewType: .info)
-
- alertSheet.modalTransitionStyle = .crossDissolve
- alertSheet.modalPresentationStyle = .overFullScreen
-
- alertSheet.centerButtonDidTapAction = { [weak self] in
- guard let self = self else { return }
-
- self.cancelScrapAnnouncement(internshipAnnouncementId: model.internshipAnnouncementId)
-
- jobCardLists[index].isScrapped = false
-
- self.dismiss(animated: false)
- }
-
- self.present(alertSheet, animated: false)
- } else {
- let alertSheet = CustomAlertViewController(alertViewType: .scrap)
- alertSheet.setAnnouncementData(model: model)
-
- alertSheet.modalTransitionStyle = .crossDissolve
- alertSheet.modalPresentationStyle = .overFullScreen
-
- alertSheet.centerButtonDidTapAction = { [weak self] in
- guard let self = self else { return }
- let selectedColorNameRelay = alertSheet.selectedColorNameRelay.value
-
- self.addScrapAnnouncement(internshipAnnouncementId: model.internshipAnnouncementId, color: selectedColorNameRelay)
-
- jobCardLists[index].isScrapped = true
-
- self.dismiss(animated: false)
- }
-
- self.present(alertSheet, animated: false)
- }
- }
-}
-
-// MARK: - UpcomingCardCellDidTapDelegate
-
-extension HomeViewController: UpcomingCardCellProtocol {
- func upcomingCardDidTap(index: Int) {
- let jobDetailViewController = JobDetailViewController(
- viewModel: JobDetailViewModel(
- jobDetailRepository: JobDetailRepository(
- scrapService: ScrapsService(
- provider: Providers.scrapsProvider
- )
- )
- )
- )
-
- let model = upcomingCardLists[index]
-
- let alertSheet = CustomAlertViewController(alertViewType: .changeColorAndPushJobDetail)
-
- jobDetailViewController.internshipAnnouncementId.accept(model.internshipAnnouncementId)
- jobDetailViewController.hidesBottomBarWhenPushed = true
- alertSheet.setAnnouncementData(model: model)
-
- alertSheet.modalTransitionStyle = .crossDissolve
- alertSheet.modalPresentationStyle = .overFullScreen
-
- track(eventName: .clickRemindInternCard)
-
- alertSheet.leftButtonDidTapAction = {
- let selectedColorNameRelay = alertSheet.selectedColorNameRelay.value
-
- self.patchScrapAnnouncement(internshipAnnouncementId: model.internshipAnnouncementId, color: selectedColorNameRelay)
- self.dismiss(animated: true)
- }
-
- alertSheet.rightButtonDidTapAction = {
- self.dismiss(animated: true)
- self.navigationController?.pushViewController(jobDetailViewController, animated: true)
-
- }
-
- self.present(alertSheet, animated: false)
- }
-}
-
-// MARK: - Network
-
-extension HomeViewController {
- func fetchTodayDeadlineDatas() {
- homeProviders.request(.getHomeToday) { [weak self] response in
- guard let self = self else { return }
- switch response {
- case .success(let result):
- let status = result.statusCode
- if 200..<300 ~= status {
- do {
- let responseDto = try result.map(BaseResponse.self)
- guard let data = responseDto.result else { return }
-
- print("๐ฅ fetchTodayDeadlineDatas: \(data.scraps)")
- upcomingCardLists = data.scraps
- hasScrapped = data.hasScrapped
-
- rootView.collectionView.reloadData()
-
- } catch {
- print(error.localizedDescription)
- }
- }
- if status >= 400 {
- print("400 error")
- self.showNetworkFailureToast()
- }
- case .failure(let error):
- print(error.localizedDescription)
- self.showNetworkFailureToast()
- }
- }
- }
-
- private func fetchFilterInfos() {
- filterProviders.request(.getFilterDatas) { [weak self] response in
- guard let self = self else { return }
- switch response {
- case .success(let result):
- let status = result.statusCode
- if 200..<300 ~= status {
- do {
- let responseDto = try result.map(BaseResponse.self)
- guard let data = responseDto.result else { return }
-
- self.filterInfos = data
-
- // 0.5์ด ๋ค์ fetchJobCardDatas ํธ์ถ
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
- self.fetchJobCardDatas(self.apiParameter)
- self.fetchTodayDeadlineDatas()
- self.rootView.collectionView.reloadData()
- }
-
- } catch {
- print(error.localizedDescription)
- }
- }
- if status >= 400 {
- print("400 error")
- self.showNetworkFailureToast()
- }
- case .failure(let error):
- print(error.localizedDescription)
- self.showNetworkFailureToast()
- }
- }
- }
-
- private func fetchJobCardDatas(_ apiParameter: String) {
- print("๐ฅ๐ฅ๐ฅFetching job card data with sortBy: \(apiParameter)๐ฅ๐ฅ๐ฅ")
-// homeProviders.request(.getHome(sortBy: apiParameter, startYear: filterInfos.startYear ?? 2024, startMonth: filterInfos.startMonth ?? 9)) { [weak self] response in
-// guard let self = self else { return }
-// switch response {
-// case .success(let result):
-// let status = result.statusCode
-// if 200..<300 ~= status {
-// do {
-// let responseDto = try result.map(BaseResponse.self)
-// guard let data = responseDto.result else { return }
-//
-// self.jobCardLists = data.result
-// self.jobCardTotalCount = data
-//
-// if !jobCardLists.isEmpty {
-// if data.result.contains(where: { $0.isScrapped }) {
-// self.hasScrapped = true
-// }
-// }
-//
-// self.rootView.collectionView.reloadData()
-// } catch {
-// print(error.localizedDescription)
-// }
-// }
-// if status >= 400 {
-// print("400 error")
-// self.showNetworkFailureToast()
-// }
-// case .failure(let error):
-// print(error.localizedDescription)
-// self.showNetworkFailureToast()
-// }
-// }
- }
-
- private func patchScrapAnnouncement(internshipAnnouncementId: Int?, color: String) {
- guard let scrapId = internshipAnnouncementId else { return }
-
- Providers.scrapsProvider.request(.patchScrap(internshipAnnouncementId: scrapId, color: color)) { [weak self] result in
- LoadingIndicator.hideLoading()
- guard let self = self else { return }
- switch result {
- case .success(let response):
- let status = response.statusCode
- if 200..<300 ~= status {
- showToast(message: "์คํฌ๋ฉ ์์์ด ๋ณ๊ฒฝ๋์์ด์!", heightOffset: 20)
- self.fetchTodayDeadlineDatas()
- self.rootView.collectionView.reloadData()
- } else {
- print("400 error")
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- case .failure(let error):
- print(error.localizedDescription)
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- }
- }
-
- private func addScrapAnnouncement(internshipAnnouncementId: Int, color: String) {
- Providers.scrapsProvider.request(.addScrap(internshipAnnouncementId: internshipAnnouncementId, color: color)) { [weak self] result in
- LoadingIndicator.hideLoading()
- guard let self = self else { return }
- switch result {
- case .success(let response):
- let status = response.statusCode
- if 200..<300 ~= status {
- self.showToast(message: "๊ด์ฌ ๊ณต๊ณ ๊ฐ ์บ๋ฆฐ๋์ ์คํฌ๋ฉ ๋์์ด์!", heightOffset: 20)
- self.fetchTodayDeadlineDatas()
- self.rootView.collectionView.reloadData()
- } else {
- print("400 error")
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- case .failure(let error):
- print(error.localizedDescription)
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- }
- }
-
- private func cancelScrapAnnouncement(internshipAnnouncementId: Int) {
- Providers.scrapsProvider.request(.removeScrap(internshipAnnouncementId: internshipAnnouncementId)) { [weak self] result in
- LoadingIndicator.hideLoading()
- guard let self = self else { return }
- switch result {
- case .success(let response):
- let status = response.statusCode
- if 200..<300 ~= status {
- self.showToast(message: "๊ด์ฌ ๊ณต๊ณ ๊ฐ ์บ๋ฆฐ๋์์ ์ฌ๋ผ์ก์ด์!", heightOffset: 20)
- self.fetchTodayDeadlineDatas()
- self.rootView.collectionView.reloadData()
- } else {
- print("400 error")
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- case .failure(let error):
- print(error.localizedDescription)
- self.showToast(message: "๋คํธ์ํฌ ์ค๋ฅ")
- }
- }
- }
-
- private func getMyPageInfo() {
- myPageProvider.request(.getProfileInfo) { [weak self] result in
- guard let self = self else { return }
- switch result {
- case .success(let response):
- let status = response.statusCode
-
- if 200..<300 ~= status {
- do {
- let responseDto = try response.map(BaseResponse.self)
- guard let data = responseDto.result else { return }
-
- userName = data.name
-
- } catch {
- print("์ฌ์ฉ์ ์ ๋ณด๋ฅผ ๋ถ๋ฌ์ฌ ์ ์์ด์.")
- print(error.localizedDescription)
- }
-
- } else {
- print("404 error")
- }
-
- case .failure(let error):
- print(error.localizedDescription)
- }
- }
- }
-}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Home/GradientLayerView.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/View/GradientLayerView.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/Home/GradientLayerView.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/View/GradientLayerView.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeView.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/View/HomeView.swift
similarity index 91%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeView.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/View/HomeView.swift
index 03cb2087..6081b010 100644
--- a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeView.swift
+++ b/Terning-iOS/Terning-iOS/Source/Presentation/Home/View/HomeView.swift
@@ -1,5 +1,5 @@
//
-// NewHomeView.swift
+// HomeView.swift
// Terning-iOS
//
// Created by ์ด๋ช
์ง on 12/19/24.
@@ -10,19 +10,19 @@ import UIKit
import SnapKit
import Then
-final class NewHomeView: UIView {
+final class HomeView: UIView {
// MARK: - Properties
- // MARK: - UIComponents
-
var hasScrapped: Bool = false
var soonData: [AnnouncementModel] = []
var userName: String = ""
+ // MARK: - UIComponents
+
lazy var collectionView: UICollectionView = {
- let layout = CompositionalLayout.createNewHomeCollectionViewLayout(hasScrapped: hasScrapped, soonData: soonData, userName: userName)
+ let layout = CompositionalLayout.createHomeCollectionViewLayout(hasScrapped: hasScrapped, soonData: soonData, userName: userName)
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
collectionView.isScrollEnabled = true
@@ -66,7 +66,7 @@ final class NewHomeView: UIView {
// MARK: - UI & Layout
-extension NewHomeView {
+extension HomeView {
private func setUI() {
gradientLayerView.isHidden = true
@@ -131,7 +131,7 @@ extension NewHomeView {
// ์๋ก์ด ๋ ์ด์์ ์์ฑ ๋ฐ ์ ์ฉ
DispatchQueue.main.async { [weak self] in
- let newLayout = CompositionalLayout.createNewHomeCollectionViewLayout(hasScrapped: hasScrapped, soonData: soonData, userName: userName)
+ let newLayout = CompositionalLayout.createHomeCollectionViewLayout(hasScrapped: hasScrapped, soonData: soonData, userName: userName)
self?.collectionView.collectionViewLayout = newLayout
self?.collectionView.reloadData()
}
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/MainFilterButton.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/View/MainFilterButton.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/MainFilterButton.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/View/MainFilterButton.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/MainSortButton.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/View/MainSortButton.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/MainSortButton.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/View/MainSortButton.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeViewController.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/ViewController/HomeViewController.swift
similarity index 96%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeViewController.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/ViewController/HomeViewController.swift
index 5bd796b4..fbc346d0 100644
--- a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/NewHomeViewController.swift
+++ b/Terning-iOS/Terning-iOS/Source/Presentation/Home/ViewController/HomeViewController.swift
@@ -1,5 +1,5 @@
//
-// NewHomeViewController.swift
+// HomeViewController.swift
// Terning-iOS
//
// Created by ์ด๋ช
์ง on 12/19/24.
@@ -25,7 +25,7 @@ struct JobMainModel: Codable {
let result: [AnnouncementModel]
}
-final class NewHomeViewController: UIViewController {
+final class HomeViewController: UIViewController {
// MARK: - Properties
@@ -86,7 +86,7 @@ final class NewHomeViewController: UIViewController {
}
}
- private lazy var rootView = NewHomeView(hasScrapped: hasScrapped, soonData: sectionTwoData, userName: userName)
+ private lazy var rootView = HomeView(hasScrapped: hasScrapped, soonData: sectionTwoData, userName: userName)
// MARK: - Life Cycles
@@ -141,8 +141,6 @@ final class NewHomeViewController: UIViewController {
rootView.collectionView.register(CheckDeadlineCell.self, forCellWithReuseIdentifier: CheckDeadlineCell.className)
rootView.collectionView.register(NonScrapInfoCell.self, forCellWithReuseIdentifier: NonScrapInfoCell.className)
- rootView.collectionView.register(ScrapInfoHeaderCell.self, forCellWithReuseIdentifier: ScrapInfoHeaderCell.className)
-
rootView.collectionView.register(StickyHeaderCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: StickyHeaderCell.className)
rootView.collectionView.register(JobCardCell.self, forCellWithReuseIdentifier: JobCardCell.className)
@@ -279,7 +277,7 @@ final class NewHomeViewController: UIViewController {
// MARK: - StickyHeaderCellDelegate
-extension NewHomeViewController: StickyHeaderCellDelegate {
+extension HomeViewController: StickyHeaderCellDelegate {
func didTapSortButton() {
let sortSettingVC = SortSettingViewController()
sortSettingVC.sortSettingDelegate = self
@@ -356,7 +354,7 @@ extension NewHomeViewController: StickyHeaderCellDelegate {
// MARK: - UICollectionViewDelegate
-extension NewHomeViewController: UICollectionViewDelegate {
+extension HomeViewController: UICollectionViewDelegate {
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let section = MainSection(rawValue: indexPath.section) else {
return
@@ -403,7 +401,7 @@ extension NewHomeViewController: UICollectionViewDelegate {
// MARK: - UICollectionViewDataSource
-extension NewHomeViewController: UICollectionViewDataSource {
+extension HomeViewController: UICollectionViewDataSource {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return MainSection.allCases.count
@@ -502,7 +500,7 @@ extension NewHomeViewController: UICollectionViewDataSource {
// MARK: - SortSettingButtonProtocol
-extension NewHomeViewController: SortSettingButtonProtocol {
+extension HomeViewController: SortSettingButtonProtocol {
func didSelectSortingOption(_ option: SortingOptions) {
guard let headerView = rootView.collectionView.supplementaryView(
forElementKind: UICollectionView.elementKindSectionHeader,
@@ -536,7 +534,7 @@ extension NewHomeViewController: SortSettingButtonProtocol {
}
}
-extension NewHomeViewController: JobCardScrapedCellProtocol {
+extension HomeViewController: JobCardScrapedCellProtocol {
func scrapButtonDidTap(index: Int) {
track(eventName: .clickHomeScrap)
@@ -585,7 +583,7 @@ extension NewHomeViewController: JobCardScrapedCellProtocol {
// MARK: - CheckDeadlineCellProtocol
-extension NewHomeViewController: CheckDeadlineCellProtocol {
+extension HomeViewController: CheckDeadlineCellProtocol {
func checkDeadlineButtonDidTap() {
self.tabBarController?.selectedIndex = 1
}
@@ -593,7 +591,7 @@ extension NewHomeViewController: CheckDeadlineCellProtocol {
// MARK: - UIAdaptivePresentationControllerDelegate
-extension NewHomeViewController: UIAdaptivePresentationControllerDelegate {
+extension HomeViewController: UIAdaptivePresentationControllerDelegate {
func removeDimmedBackgroundView() {
if let presentingView = self.view,
let dimmedBackgroundView = presentingView.viewWithTag(999) {
@@ -612,8 +610,8 @@ extension NewHomeViewController: UIAdaptivePresentationControllerDelegate {
// MARK: - UpcomingCardCellProtocol
-extension NewHomeViewController: UpcomingCardCellProtocol {
- func upcomingCardDidTap(index: Int) {
+extension HomeViewController: UpcomingCardCellProtocol {
+ func upcomingCardDidTap(indexPath index: Int) {
print(index)
let jobDetailViewController = JobDetailViewController(
viewModel: JobDetailViewModel(
@@ -652,7 +650,7 @@ extension NewHomeViewController: UpcomingCardCellProtocol {
// MARK: - Network
-extension NewHomeViewController {
+extension HomeViewController {
private func getMyPageInfo() {
myPageProvider.request(.getProfileInfo) { result in
switch result {
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/ViewModel/HomeViewModel.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Home/ViewModel/HomeViewModel.swift
similarity index 100%
rename from Terning-iOS/Terning-iOS/Source/Presentation/RefactorHome/ViewModel/HomeViewModel.swift
rename to Terning-iOS/Terning-iOS/Source/Presentation/Home/ViewModel/HomeViewModel.swift
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/TabBar/TNTabBarItem.swift b/Terning-iOS/Terning-iOS/Source/Presentation/TabBar/TNTabBarItem.swift
index 41274e39..ab1b6f10 100644
--- a/Terning-iOS/Terning-iOS/Source/Presentation/TabBar/TNTabBarItem.swift
+++ b/Terning-iOS/Terning-iOS/Source/Presentation/TabBar/TNTabBarItem.swift
@@ -55,7 +55,7 @@ enum TNTabBarItem {
var viewController: UIViewController {
switch self {
case .home:
- return NewHomeViewController(
+ return HomeViewController(
viewModel: HomeViewModel(
useCase: HomeUseCase(
repository: HomeRepository(
diff --git a/Terning-iOS/Terning-iOS/Source/Presentation/Welcome/ViewController/WelcomeViewController.swift b/Terning-iOS/Terning-iOS/Source/Presentation/Welcome/ViewController/WelcomeViewController.swift
index 653ababb..d21286fa 100644
--- a/Terning-iOS/Terning-iOS/Source/Presentation/Welcome/ViewController/WelcomeViewController.swift
+++ b/Terning-iOS/Terning-iOS/Source/Presentation/Welcome/ViewController/WelcomeViewController.swift
@@ -93,6 +93,7 @@ extension WelcomeViewController {
}
}
@objc private func skipButtonDidTap() {
+ track(eventName: .skipPlan)
navigateToTabBar()
}
}