From f10072a30aea2cc0a16dd3b1a8dd8ef9c4ace0b0 Mon Sep 17 00:00:00 2001 From: jeongdung-eo Date: Sat, 23 Mar 2024 17:03:13 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Fix]=20#241=20-=20Factory=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iOS-NOTTODO.xcodeproj/project.pbxproj | 64 ++++- .../AchieveViewControllerFactory.swift | 38 +++ .../Factory/AuthViewControllerFactory.swift | 52 ++++ .../Factory/HomeViewControllerFactory.swift | 91 +++++++ .../Factory/MyPageViewControllerFactory.swift | 25 ++ .../AchieveFlowControllerFactory.swift | 13 + .../Protocol/AuthFlowControllerFactory.swift | 18 ++ .../Protocol/HomeFlowControllerFactory.swift | 20 ++ .../MyPageFlowControllerFactory.swift | 14 ++ .../TabBarFlowControllerFactory.swift | 12 + .../UpdateFlowcontrollerFactory.swift | 12 + .../Factory/TabBarViewControllerFactory.swift | 24 ++ .../Factory/UpdateViewControllerFactory.swift | 15 ++ .../Factory/ViewControllerFactory.swift | 226 ------------------ .../AchievementViewController.swift | 2 +- 15 files changed, 395 insertions(+), 231 deletions(-) create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AchieveViewControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/HomeViewControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/MyPageViewControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AchieveFlowControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AuthFlowControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/HomeFlowControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/MyPageFlowControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/TabBarFlowControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/UpdateFlowcontrollerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/TabBarViewControllerFactory.swift create mode 100644 iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/UpdateViewControllerFactory.swift diff --git a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj index ff728d61..f8905f3d 100644 --- a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj +++ b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj @@ -65,6 +65,19 @@ 09C8602D2AB14B4800C4F4B1 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 09C8602C2AB14B4800C4F4B1 /* FSCalendar */; }; 09CF56042B09F23800526C8C /* HomeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CF56032B09F23800526C8C /* HomeDataSource.swift */; }; 09DB33E02BA2C0DF00B5F961 /* BaseAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DB33DF2BA2C0DF00B5F961 /* BaseAPI.swift */; }; + 09DC0EEE2BAEC1790075AAC9 /* API_KEY.plist in Resources */ = {isa = PBXBuildFile; fileRef = 09DC0EED2BAEC1790075AAC9 /* API_KEY.plist */; }; + 09DC0EF12BAEC1D70075AAC9 /* AuthFlowControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EF02BAEC1D70075AAC9 /* AuthFlowControllerFactory.swift */; }; + 09DC0EF32BAEC1F10075AAC9 /* UpdateFlowcontrollerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EF22BAEC1F10075AAC9 /* UpdateFlowcontrollerFactory.swift */; }; + 09DC0EF52BAEC2030075AAC9 /* HomeFlowControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EF42BAEC2030075AAC9 /* HomeFlowControllerFactory.swift */; }; + 09DC0EF72BAEC2140075AAC9 /* MyPageFlowControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EF62BAEC2140075AAC9 /* MyPageFlowControllerFactory.swift */; }; + 09DC0EF92BAEC2230075AAC9 /* AchieveFlowControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EF82BAEC2230075AAC9 /* AchieveFlowControllerFactory.swift */; }; + 09DC0EFB2BAEC2340075AAC9 /* TabBarFlowControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EFA2BAEC2340075AAC9 /* TabBarFlowControllerFactory.swift */; }; + 09DC0EFD2BAEC2710075AAC9 /* UpdateViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EFC2BAEC2710075AAC9 /* UpdateViewControllerFactory.swift */; }; + 09DC0EFF2BAEC2750075AAC9 /* HomeViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0EFE2BAEC2750075AAC9 /* HomeViewControllerFactory.swift */; }; + 09DC0F012BAEC27A0075AAC9 /* AuthViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0F002BAEC27A0075AAC9 /* AuthViewControllerFactory.swift */; }; + 09DC0F032BAEC2800075AAC9 /* MyPageViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0F022BAEC2800075AAC9 /* MyPageViewControllerFactory.swift */; }; + 09DC0F052BAEC2850075AAC9 /* AchieveViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0F042BAEC2850075AAC9 /* AchieveViewControllerFactory.swift */; }; + 09DC0F072BAEC2890075AAC9 /* TabBarViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DC0F062BAEC2890075AAC9 /* TabBarViewControllerFactory.swift */; }; 09DCB84D2BA0146800B6BB74 /* DetailAchievementViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCB84C2BA0146800B6BB74 /* DetailAchievementViewModel.swift */; }; 09DCB84F2BA0147500B6BB74 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCB84E2BA0147500B6BB74 /* ViewModel.swift */; }; 09DCB8512BA0156400B6BB74 /* DetailAchievementViewModelImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCB8502BA0156400B6BB74 /* DetailAchievementViewModelImpl.swift */; }; @@ -137,7 +150,6 @@ 3B4E12F82A27C12F001D1EC1 /* WithdrawModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4E12F72A27C12F001D1EC1 /* WithdrawModalView.swift */; }; 3B4E12FA2A27C4DD001D1EC1 /* Pretendard-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3B4E12F92A27C4DD001D1EC1 /* Pretendard-Bold.otf */; }; 3B50CB212A40E75400F2E761 /* AddMissionResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B50CB202A40E75400F2E761 /* AddMissionResponseDTO.swift */; }; - 3B570B342BA30E6100418250 /* API_KEY.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B570B332BA30E6100418250 /* API_KEY.plist */; }; 3B5F8F7A29BF8E8D0063A7F8 /* AddMissionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F8F7929BF8E8D0063A7F8 /* AddMissionProtocol.swift */; }; 3B5F8F7F29BF900A0063A7F8 /* DateCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F8F7E29BF900A0063A7F8 /* DateCollectionViewCell.swift */; }; 3B5F8F8129BF90190063A7F8 /* NottodoCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F8F8029BF90190063A7F8 /* NottodoCollectionViewCell.swift */; }; @@ -265,6 +277,19 @@ 09A8E48D2B9DBEC700C0F48F /* BaseService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseService.swift; sourceTree = ""; }; 09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = ""; }; 09DB33DF2BA2C0DF00B5F961 /* BaseAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseAPI.swift; sourceTree = ""; }; + 09DC0EED2BAEC1790075AAC9 /* API_KEY.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = API_KEY.plist; path = ../../../../Desktop/API_KEY.plist; sourceTree = ""; }; + 09DC0EF02BAEC1D70075AAC9 /* AuthFlowControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthFlowControllerFactory.swift; sourceTree = ""; }; + 09DC0EF22BAEC1F10075AAC9 /* UpdateFlowcontrollerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateFlowcontrollerFactory.swift; sourceTree = ""; }; + 09DC0EF42BAEC2030075AAC9 /* HomeFlowControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeFlowControllerFactory.swift; sourceTree = ""; }; + 09DC0EF62BAEC2140075AAC9 /* MyPageFlowControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageFlowControllerFactory.swift; sourceTree = ""; }; + 09DC0EF82BAEC2230075AAC9 /* AchieveFlowControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AchieveFlowControllerFactory.swift; sourceTree = ""; }; + 09DC0EFA2BAEC2340075AAC9 /* TabBarFlowControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarFlowControllerFactory.swift; sourceTree = ""; }; + 09DC0EFC2BAEC2710075AAC9 /* UpdateViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateViewControllerFactory.swift; sourceTree = ""; }; + 09DC0EFE2BAEC2750075AAC9 /* HomeViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewControllerFactory.swift; sourceTree = ""; }; + 09DC0F002BAEC27A0075AAC9 /* AuthViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthViewControllerFactory.swift; sourceTree = ""; }; + 09DC0F022BAEC2800075AAC9 /* MyPageViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageViewControllerFactory.swift; sourceTree = ""; }; + 09DC0F042BAEC2850075AAC9 /* AchieveViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AchieveViewControllerFactory.swift; sourceTree = ""; }; + 09DC0F062BAEC2890075AAC9 /* TabBarViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewControllerFactory.swift; sourceTree = ""; }; 09DCB84C2BA0146800B6BB74 /* DetailAchievementViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailAchievementViewModel.swift; sourceTree = ""; }; 09DCB84E2BA0147500B6BB74 /* ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = ""; }; 09DCB8502BA0156400B6BB74 /* DetailAchievementViewModelImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailAchievementViewModelImpl.swift; sourceTree = ""; }; @@ -336,7 +361,6 @@ 3B4E12F72A27C12F001D1EC1 /* WithdrawModalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WithdrawModalView.swift; sourceTree = ""; }; 3B4E12F92A27C4DD001D1EC1 /* Pretendard-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Bold.otf"; sourceTree = ""; }; 3B50CB202A40E75400F2E761 /* AddMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionResponseDTO.swift; sourceTree = ""; }; - 3B570B332BA30E6100418250 /* API_KEY.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = API_KEY.plist; sourceTree = ""; }; 3B5F8F7929BF8E8D0063A7F8 /* AddMissionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionProtocol.swift; sourceTree = ""; }; 3B5F8F7E29BF900A0063A7F8 /* DateCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateCollectionViewCell.swift; sourceTree = ""; }; 3B5F8F8029BF90190063A7F8 /* NottodoCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NottodoCollectionViewCell.swift; sourceTree = ""; }; @@ -584,6 +608,13 @@ children = ( 0989043D2B81BD50004AAD3C /* CoordinatorFactory.swift */, 0989043F2B81BFAF004AAD3C /* ViewControllerFactory.swift */, + 09DC0EEF2BAEC1B80075AAC9 /* Protocol */, + 09DC0EFC2BAEC2710075AAC9 /* UpdateViewControllerFactory.swift */, + 09DC0EFE2BAEC2750075AAC9 /* HomeViewControllerFactory.swift */, + 09DC0F002BAEC27A0075AAC9 /* AuthViewControllerFactory.swift */, + 09DC0F022BAEC2800075AAC9 /* MyPageViewControllerFactory.swift */, + 09DC0F042BAEC2850075AAC9 /* AchieveViewControllerFactory.swift */, + 09DC0F062BAEC2890075AAC9 /* TabBarViewControllerFactory.swift */, ); path = Factory; sourceTree = ""; @@ -664,6 +695,19 @@ path = Mission; sourceTree = ""; }; + 09DC0EEF2BAEC1B80075AAC9 /* Protocol */ = { + isa = PBXGroup; + children = ( + 09DC0EF02BAEC1D70075AAC9 /* AuthFlowControllerFactory.swift */, + 09DC0EF22BAEC1F10075AAC9 /* UpdateFlowcontrollerFactory.swift */, + 09DC0EF42BAEC2030075AAC9 /* HomeFlowControllerFactory.swift */, + 09DC0EF62BAEC2140075AAC9 /* MyPageFlowControllerFactory.swift */, + 09DC0EF82BAEC2230075AAC9 /* AchieveFlowControllerFactory.swift */, + 09DC0EFA2BAEC2340075AAC9 /* TabBarFlowControllerFactory.swift */, + ); + path = Protocol; + sourceTree = ""; + }; 09DCB85B2BA0316500B6BB74 /* Manager */ = { isa = PBXGroup; children = ( @@ -968,7 +1012,7 @@ 3B027AA6299C359900BEB65C /* Resource */ = { isa = PBXGroup; children = ( - 3B570B332BA30E6100418250 /* API_KEY.plist */, + 09DC0EED2BAEC1790075AAC9 /* API_KEY.plist */, 3B3EF2F72AF35C90001F79BC /* GoogleService-Info.plist */, 3B027A85299C31B600BEB65C /* Info.plist */, 3B027AAA299C35D000BEB65C /* Assets */, @@ -1413,7 +1457,7 @@ 3B710A5C2A62D4AB00E95620 /* Settings.bundle in Resources */, 3B027A84299C31B600BEB65C /* LaunchScreen.storyboard in Resources */, 6CC54C1A2A28C3AE00AAD76D /* value.json in Resources */, - 3B570B342BA30E6100418250 /* API_KEY.plist in Resources */, + 09DC0EEE2BAEC1790075AAC9 /* API_KEY.plist in Resources */, 3B3EF2F82AF35C90001F79BC /* GoogleService-Info.plist in Resources */, 6C049A312A595C670085E40B /* logo.mp4 in Resources */, 3B027A81299C31B600BEB65C /* Assets.xcassets in Resources */, @@ -1456,6 +1500,7 @@ 0960C0D62A38BC8100A3D8DB /* DefaultKeys.swift in Sources */, 3B14A14129A6FDA900F92897 /* UILabel+.swift in Sources */, 09DCB8672BA05F5400B6BB74 /* AchievementViewModel.swift in Sources */, + 09DC0EF92BAEC2230075AAC9 /* AchieveFlowControllerFactory.swift in Sources */, 09A146652A1964B500DDC308 /* AddAnotherDayResponseDTO.swift in Sources */, 3B027A7C299C31B500BEB65C /* AuthViewController.swift in Sources */, 098904382B81BC16004AAD3C /* AppCoordinator.swift in Sources */, @@ -1470,6 +1515,7 @@ 3B027A94299C340600BEB65C /* UIFont+.swift in Sources */, 6CA208292A191185001C4247 /* UIImageView+.swift in Sources */, 0982DE5A29AE5E6000D933D2 /* CompositionalLayout.swift in Sources */, + 09DC0EF12BAEC1D70075AAC9 /* AuthFlowControllerFactory.swift in Sources */, 098904522B81CA33004AAD3C /* UpdateCoordinatorImpl.swift in Sources */, 098904442B81C18A004AAD3C /* HomeCoordinator.swift in Sources */, 095FEE122B9ED15600FF44C0 /* DetailAchieveHeaderView.swift in Sources */, @@ -1478,6 +1524,7 @@ 098BFD5929B7999E008E80F9 /* MyProfileCollectionViewCell.swift in Sources */, 09DCB84D2BA0146800B6BB74 /* DetailAchievementViewModel.swift in Sources */, 3B5F8F7A29BF8E8D0063A7F8 /* AddMissionProtocol.swift in Sources */, + 09DC0F012BAEC27A0075AAC9 /* AuthViewControllerFactory.swift in Sources */, 09DCB8512BA0156400B6BB74 /* DetailAchievementViewModelImpl.swift in Sources */, 09F6718C29CB4AB700708725 /* SubOnboardingCollectionViewCell.swift in Sources */, 0921611D2A57D0920019CC8C /* AmplitudeAnalyticsService.swift in Sources */, @@ -1486,6 +1533,7 @@ 098BFD5B29B79B6A008E80F9 /* MyInfoModel.swift in Sources */, 09DCCD1F2A18ED76003DCF8A /* DailyMissionResponseDTO.swift in Sources */, 6CF4707A29A7AAFF008D145C /* PaddingLabel.swift in Sources */, + 09DC0EFD2BAEC2710075AAC9 /* UpdateViewControllerFactory.swift in Sources */, 6CA208272A18FFCF001C4247 /* RecommendResponseDTO.swift in Sources */, 3B4E12F22A27B621001D1EC1 /* NottodoModalViewController.swift in Sources */, 3B027A78299C31B500BEB65C /* AppDelegate.swift in Sources */, @@ -1529,6 +1577,7 @@ 098904302B81BB3A004AAD3C /* Coordinator.swift in Sources */, 3B14A13D29A6FBD300F92897 /* UIView+.swift in Sources */, 09F6719529CBFCD200708725 /* GradientView.swift in Sources */, + 09DC0F052BAEC2850075AAC9 /* AchieveViewControllerFactory.swift in Sources */, 09DCB8622BA031F600B6BB74 /* AchieveManagerImpl.swift in Sources */, 3B4E12F82A27C12F001D1EC1 /* WithdrawModalView.swift in Sources */, 6CA208252A18FEEA001C4247 /* RecommendAPI.swift in Sources */, @@ -1539,11 +1588,13 @@ 09582B4829BDA7F600EF3207 /* DetailStackView.swift in Sources */, 09F6718429CADB1100708725 /* OnboardingModel.swift in Sources */, 095FEE132B9ED15600FF44C0 /* StatisticsView.swift in Sources */, + 09DC0EF32BAEC1F10075AAC9 /* UpdateFlowcontrollerFactory.swift in Sources */, 3B027A7A299C31B500BEB65C /* SceneDelegate.swift in Sources */, 0989043E2B81BD50004AAD3C /* CoordinatorFactory.swift in Sources */, 0964BA4A2B0F6BFB00A8984B /* AuthInterceptor.swift in Sources */, 09582B5129C0BC3600EF3207 /* DetailAchievementViewController.swift in Sources */, 09DCB8582BA0309F00B6BB74 /* ErrorReponse.swift in Sources */, + 09DC0F032BAEC2800075AAC9 /* MyPageViewControllerFactory.swift in Sources */, 0982DE5829AE40FB00D933D2 /* UITabBar+.swift in Sources */, 3BC1A27929C9BE6C0088376B /* AddMissionFooterCollectionReusableView.swift in Sources */, 6C16015829C40112005AE3F5 /* AuthButtonView.swift in Sources */, @@ -1571,6 +1622,8 @@ 0987C8402B9DD4DC007EE8DE /* MissionAPI.swift in Sources */, 6CD4F8C229AA5AF200CCC740 /* UIButton+.swift in Sources */, 6CA208362A1957CA001C4247 /* AuthService.swift in Sources */, + 09DC0EFF2BAEC2750075AAC9 /* HomeViewControllerFactory.swift in Sources */, + 09DC0EF52BAEC2030075AAC9 /* HomeFlowControllerFactory.swift in Sources */, 6CA208362A1957CA001C4247 /* AuthService.swift in Sources */, 099FC98129B3094F005B37E6 /* WeekMonthFSCalendar.swift in Sources */, 6C16016429C5E37D005AE3F5 /* MyInfoAccountStackView.swift in Sources */, @@ -1591,6 +1644,7 @@ 09ED941B2B2ABAB7001864EF /* CommonNotificationViewController.swift in Sources */, 6C9628A92A22209E003ADE25 /* LogoOnboardingViewController.swift in Sources */, 09F6718029CAD76C00708725 /* SecondOnboardingViewController.swift in Sources */, + 09DC0EFB2BAEC2340075AAC9 /* TabBarFlowControllerFactory.swift in Sources */, 098A23A42B833F0300265955 /* AuthCoordinatorImpl.swift in Sources */, 098BFD5D29B79CE3008E80F9 /* InfoCollectionViewCell.swift in Sources */, 3B0CBA222A45FC170004F2DB /* UpdateMissionResponseDTO.swift in Sources */, @@ -1599,6 +1653,7 @@ 09DCB8562BA0308D00B6BB74 /* APIError.swift in Sources */, 098904402B81BFAF004AAD3C /* ViewControllerFactory.swift in Sources */, 3B9532F42A284CC1006510F8 /* ModalProtocol.swift in Sources */, + 09DC0EF72BAEC2140075AAC9 /* MyPageFlowControllerFactory.swift in Sources */, 3B5F8F8329BF90290063A7F8 /* SituationCollectionViewCell.swift in Sources */, 3B4E12F62A27C0BE001D1EC1 /* QuitModalView.swift in Sources */, 6CA208232A18FE78001C4247 /* RecommendService.swift in Sources */, @@ -1607,6 +1662,7 @@ 09DCB8692BA05F9E00B6BB74 /* AchievementModel.swift in Sources */, 098904542B81CA47004AAD3C /* UpdateCoordinator.swift in Sources */, 0989044E2B81C216004AAD3C /* MypageCoordinatorImpl.swift in Sources */, + 09DC0F072BAEC2890075AAC9 /* TabBarViewControllerFactory.swift in Sources */, 09DCB8652BA056C800B6BB74 /* DetailAchievementModel.swift in Sources */, 09DCB8602BA031E000B6BB74 /* AchieveManager.swift in Sources */, ); diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AchieveViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AchieveViewControllerFactory.swift new file mode 100644 index 00000000..602f2f31 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AchieveViewControllerFactory.swift @@ -0,0 +1,38 @@ +// +// AchieveViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +extension ViewControllerFactoryImpl { + + func makeAchieveViewModel(coordinator: AchieveCoordinator) -> any AchievementViewModel { + let missionAPI = DefaultMissionService() + let manager = AchieveManagerImpl(missionAPI: missionAPI) + let viewModel = AchievementViewModelImpl(coordinator: coordinator, manager: manager) + return viewModel + } + + func makeAchieveViewController(coordinator: AchieveCoordinator) -> AchievementViewController { + let viewModel = self.makeAchieveViewModel(coordinator: coordinator) + let viewController = AchievementViewController(viewModel: viewModel) + return viewController + } + + func makeAchieveDetailViewModel(coordinator: AchieveCoordinator) -> any DetailAchievementViewModel & DetailAchievementViewModelPresentable { + let missionAPI = DefaultMissionService() + let manager = AchieveManagerImpl(missionAPI: missionAPI) + let viewModel = DetailAchievementViewModelImpl(coordinator: coordinator, manager: manager) + return viewModel + } + + func makeAchieveDetailViewController(coordinator: AchieveCoordinator, date: String) -> DetailAchievementViewController { + let viewModel = self.makeAchieveDetailViewModel(coordinator: coordinator) + viewModel.selectedDate(date) + let viewController = DetailAchievementViewController(viewModel: viewModel) + return viewController + } +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift new file mode 100644 index 00000000..87ac3689 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift @@ -0,0 +1,52 @@ +// +// AuthViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +extension ViewControllerFactoryImpl { + func makeAuthViewController(coordinator: AuthCoordinator) -> AuthViewController { + let viewController = AuthViewController(coordinator: coordinator) + return viewController + } + + func makeNotificationDialogViewController(coordinator: AuthCoordinator, completion: @escaping () -> Void) -> NotificationDialogViewController { + let viewController = NotificationDialogViewController() + viewController.buttonHandler = { + completion() + } + return viewController + } +} + +// Onboarding +extension ViewControllerFactoryImpl { + func makeValueOnboardingViewController(coordinator: AuthCoordinator) -> ValueOnboardingViewController { + let viewController = ValueOnboardingViewController(coordinator: coordinator) + return viewController + } + func makeLogoOnboardingViewController(coordinator: AuthCoordinator) -> LogoOnboardingViewController { + let viewController = LogoOnboardingViewController(coordinator: coordinator) + return viewController + } + func makeSecondOnboardingViewController(coordinator: AuthCoordinator) -> SecondOnboardingViewController { + let viewController = SecondOnboardingViewController(coordinator: coordinator) + return viewController + } + func makeThirdOnboardingViewController(coordinator: AuthCoordinator) -> ThirdOnboardingViewController { + let viewController = ThirdOnboardingViewController(coordinator: coordinator) + return viewController + } + func makeFourthOnboardingViewController(coordinator: AuthCoordinator) -> FourthOnboardingViewController { + let viewController = FourthOnboardingViewController(coordinator: coordinator) + return viewController + } + func makeFifthOnboardingViewController(coordinator: AuthCoordinator) -> FifthOnboardingViewController { + let viewController = FifthOnboardingViewController(coordinator: coordinator) + return viewController + } +} + diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/HomeViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/HomeViewControllerFactory.swift new file mode 100644 index 00000000..f5730ef2 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/HomeViewControllerFactory.swift @@ -0,0 +1,91 @@ +// +// HomeViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +// Home +extension ViewControllerFactoryImpl { + func makePopupViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> CommonNotificationViewController { + let viewController = CommonNotificationViewController(coordinator: coordinator) + viewController.tapCloseButton = { + completion() + } + return viewController + } + + func makeHomeViewController(coordinator: HomeCoordinator) -> HomeViewController { + let viewController = HomeViewController(coordinator: coordinator) + return viewController + } +} + +// HomeDetail +extension ViewControllerFactoryImpl { + func makeDeleteViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> HomeDeleteViewController { + let viewController = HomeDeleteViewController(coordinator: coordinator) + viewController.deleteClosure = { + completion() + } + return viewController + } + + func makeMissionDetailViewController(coordinator: HomeCoordinator, id: Int, deleteClosure: @escaping () -> Void, moveDateClosure: @escaping (String) -> Void) -> MissionDetailViewController { + let viewController = MissionDetailViewController(coordinator: coordinator) + viewController.userId = id + viewController.deleteClosure = { + deleteClosure() + } + viewController.moveDateClosure = { date in + moveDateClosure(date) + } + return viewController + } + + func makeModifyViewController(coordinator: HomeCoordinator, id: Int = 0, type: MissionType) -> AddMissionViewController { + let viewController = AddMissionViewController(coordinator: coordinator) + viewController.setViewType(type) + viewController.setMissionId(id) + return viewController + } + + func makeSelectDateViewController(coordinator: HomeCoordinator, data: MissionDetailResponseDTO, id: Int, moveDateClosure: @escaping (String) -> Void) -> DetailCalendarViewController { + let viewController = DetailCalendarViewController(coordinator: coordinator) + viewController.detailModel = data + viewController.userId = id + viewController.movedateClosure = { date in + moveDateClosure(date) + } + return viewController + } +} + +// Add Mission +extension ViewControllerFactoryImpl { + + func makeRecommendViewController(coordinator: HomeCoordinator, date: String) -> RecommendViewController { + let viewController = RecommendViewController(coordinator: coordinator) + viewController.setSelectDate(date) + return viewController + } + + func makeRecommendDetailViewController(coordinator: HomeCoordinator, data: RecommendActionData) -> RecommendActionViewController { + let viewController = RecommendActionViewController(coordinator: coordinator) + viewController.actionHeaderData = data + return viewController + } + + func makeAddViewController(coordinator: HomeCoordinator, data: AddMissionData, type: MissionType) -> AddMissionViewController { + let viewController = AddMissionViewController(coordinator: coordinator) + viewController.setViewType(type) + viewController.setNottodoLabel(data.nottodo ?? "") + viewController.setSituationLabel(data.situation ?? "") + viewController.setActionLabel(data.action ?? "") + viewController.setDate(data.date) + + return viewController + } +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/MyPageViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/MyPageViewControllerFactory.swift new file mode 100644 index 00000000..64d8812f --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/MyPageViewControllerFactory.swift @@ -0,0 +1,25 @@ +// +// MyPageViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +extension ViewControllerFactoryImpl { + func makeMyInfoViewController(coordinator: MypageCoordinator) -> MyInfoViewController { + let viewController = MyInfoViewController(coordinator: coordinator) + return viewController + } + + func makeMyInfoAccountViewController(coordinator: MypageCoordinator) -> MyInfoAccountViewController { + let viewController = MyInfoAccountViewController(coordinator: coordinator) + return viewController + } + + func makeWithdrawViewController(coordinator: MypageCoordinator) -> NottodoModalViewController { + let viewController = NottodoModalViewController(coordinator: coordinator) + return viewController + } +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AchieveFlowControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AchieveFlowControllerFactory.swift new file mode 100644 index 00000000..ac76903e --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AchieveFlowControllerFactory.swift @@ -0,0 +1,13 @@ +// +// AchieveFlowControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +protocol AchieveFlowControllerFactory { + func makeAchieveViewController(coordinator: AchieveCoordinator) -> AchievementViewController + func makeAchieveDetailViewController(coordinator: AchieveCoordinator, date: String) -> DetailAchievementViewController +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AuthFlowControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AuthFlowControllerFactory.swift new file mode 100644 index 00000000..45e5cff5 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/AuthFlowControllerFactory.swift @@ -0,0 +1,18 @@ +// +// AuthFlowControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation +protocol AuthFlowControllerFactory { + func makeValueOnboardingViewController(coordinator: AuthCoordinator) -> ValueOnboardingViewController + func makeLogoOnboardingViewController(coordinator: AuthCoordinator) -> LogoOnboardingViewController + func makeSecondOnboardingViewController(coordinator: AuthCoordinator) -> SecondOnboardingViewController + func makeThirdOnboardingViewController(coordinator: AuthCoordinator) -> ThirdOnboardingViewController + func makeFourthOnboardingViewController(coordinator: AuthCoordinator) -> FourthOnboardingViewController + func makeFifthOnboardingViewController(coordinator: AuthCoordinator) -> FifthOnboardingViewController + func makeAuthViewController(coordinator: AuthCoordinator) -> AuthViewController + func makeNotificationDialogViewController(coordinator: AuthCoordinator, completion: @escaping () -> Void) -> NotificationDialogViewController +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/HomeFlowControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/HomeFlowControllerFactory.swift new file mode 100644 index 00000000..c57717a8 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/HomeFlowControllerFactory.swift @@ -0,0 +1,20 @@ +// +// HomeFlowControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +protocol HomeFlowControllerFactory { + func makePopupViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> CommonNotificationViewController + func makeHomeViewController(coordinator: HomeCoordinator) -> HomeViewController + func makeRecommendViewController(coordinator: HomeCoordinator, date: String) -> RecommendViewController + func makeRecommendDetailViewController(coordinator: HomeCoordinator, data: RecommendActionData) -> RecommendActionViewController + func makeAddViewController(coordinator: HomeCoordinator, data: AddMissionData, type: MissionType) -> AddMissionViewController + func makeDeleteViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> HomeDeleteViewController + func makeMissionDetailViewController(coordinator: HomeCoordinator, id: Int, deleteClosure: @escaping () -> Void, moveDateClosure: @escaping (String) -> Void) -> MissionDetailViewController + func makeModifyViewController(coordinator: HomeCoordinator, id: Int, type: MissionType) -> AddMissionViewController + func makeSelectDateViewController(coordinator: HomeCoordinator, data: MissionDetailResponseDTO, id: Int, moveDateClosure: @escaping (String) -> Void) -> DetailCalendarViewController +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/MyPageFlowControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/MyPageFlowControllerFactory.swift new file mode 100644 index 00000000..0ef669c8 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/MyPageFlowControllerFactory.swift @@ -0,0 +1,14 @@ +// +// MyPageFlowControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +protocol MyPageFlowControllerFactory { + func makeMyInfoViewController(coordinator: MypageCoordinator) -> MyInfoViewController + func makeMyInfoAccountViewController(coordinator: MypageCoordinator) -> MyInfoAccountViewController + func makeWithdrawViewController(coordinator: MypageCoordinator) -> NottodoModalViewController +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/TabBarFlowControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/TabBarFlowControllerFactory.swift new file mode 100644 index 00000000..b37b98ca --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/TabBarFlowControllerFactory.swift @@ -0,0 +1,12 @@ +// +// TabBarFlowControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import UIKit + +protocol TabBarControllerFactory { + func makeTabBarController(_ navigationController: UINavigationController) -> (UITabBarController, [UINavigationController]) +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/UpdateFlowcontrollerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/UpdateFlowcontrollerFactory.swift new file mode 100644 index 00000000..81aa1343 --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/Protocol/UpdateFlowcontrollerFactory.swift @@ -0,0 +1,12 @@ +// +// UpdateFlowcontrollerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +protocol UpdateFlowcontrollerFactory { + func makeUpdateCheckViewController(coordinator: UpdateCoordinator) -> UpdateCheckViewController +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/TabBarViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/TabBarViewControllerFactory.swift new file mode 100644 index 00000000..c608f4af --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/TabBarViewControllerFactory.swift @@ -0,0 +1,24 @@ +// +// TabBarViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import UIKit + +extension ViewControllerFactoryImpl { + func makeTabBarController(_: UINavigationController) -> (UITabBarController, [UINavigationController]) { + let tabBarController = TabBarController() + let navigationControllers = tabBarController.setTabBarItems().map(makeNavigationController) + + return (tabBarController, navigationControllers) + } + + func makeNavigationController(_ tabBarItem: UITabBarItem) -> UINavigationController { + let navigationController = UINavigationController() + navigationController.tabBarItem = tabBarItem + navigationController.setNavigationBarHidden(true, animated: false) + return navigationController + } +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/UpdateViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/UpdateViewControllerFactory.swift new file mode 100644 index 00000000..db6d76ed --- /dev/null +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/UpdateViewControllerFactory.swift @@ -0,0 +1,15 @@ +// +// UpdateViewControllerFactory.swift +// iOS-NOTTODO +// +// Created by JEONGEUN KIM on 3/23/24. +// + +import Foundation + +extension ViewControllerFactoryImpl { + func makeUpdateCheckViewController(coordinator: UpdateCoordinator) -> UpdateCheckViewController { + let viewController = UpdateCheckViewController(coordinator: coordinator) + return viewController + } +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/ViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/ViewControllerFactory.swift index e1ebf681..b8381e89 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/ViewControllerFactory.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/ViewControllerFactory.swift @@ -9,230 +9,4 @@ import UIKit protocol ViewControllerFactory: UpdateFlowcontrollerFactory, AuthFlowControllerFactory, HomeFlowControllerFactory, MyPageFlowControllerFactory, AchieveFlowControllerFactory, TabBarControllerFactory, AuthFlowControllerFactory {} -protocol UpdateFlowcontrollerFactory { - func makeUpdateCheckViewController(coordinator: UpdateCoordinator) -> UpdateCheckViewController -} - -protocol AuthFlowControllerFactory { - func makeValueOnboardingViewController(coordinator: AuthCoordinator) -> ValueOnboardingViewController - func makeLogoOnboardingViewController(coordinator: AuthCoordinator) -> LogoOnboardingViewController - func makeSecondOnboardingViewController(coordinator: AuthCoordinator) -> SecondOnboardingViewController - func makeThirdOnboardingViewController(coordinator: AuthCoordinator) -> ThirdOnboardingViewController - func makeFourthOnboardingViewController(coordinator: AuthCoordinator) -> FourthOnboardingViewController - func makeFifthOnboardingViewController(coordinator: AuthCoordinator) -> FifthOnboardingViewController - func makeAuthViewController(coordinator: AuthCoordinator) -> AuthViewController - func makeNotificationDialogViewController(coordinator: AuthCoordinator, completion: @escaping () -> Void) -> NotificationDialogViewController - -} - -protocol HomeFlowControllerFactory { - func makePopupViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> CommonNotificationViewController - func makeHomeViewController(coordinator: HomeCoordinator) -> HomeViewController - func makeRecommendViewController(coordinator: HomeCoordinator, date: String) -> RecommendViewController - func makeRecommendDetailViewController(coordinator: HomeCoordinator, data: RecommendActionData) -> RecommendActionViewController - func makeAddViewController(coordinator: HomeCoordinator, data: AddMissionData, type: MissionType) -> AddMissionViewController - func makeDeleteViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> HomeDeleteViewController - func makeMissionDetailViewController(coordinator: HomeCoordinator, id: Int, deleteClosure: @escaping () -> Void, moveDateClosure: @escaping (String) -> Void) -> MissionDetailViewController - func makeModifyViewController(coordinator: HomeCoordinator, id: Int, type: MissionType) -> AddMissionViewController - func makeSelectDateViewController(coordinator: HomeCoordinator, data: MissionDetailResponseDTO, id: Int, moveDateClosure: @escaping (String) -> Void) -> DetailCalendarViewController -} - -protocol MyPageFlowControllerFactory { - func makeMyInfoViewController(coordinator: MypageCoordinator) -> MyInfoViewController - func makeMyInfoAccountViewController(coordinator: MypageCoordinator) -> MyInfoAccountViewController - func makeWithdrawViewController(coordinator: MypageCoordinator) -> NottodoModalViewController -} - -protocol AchieveFlowControllerFactory { - func makeAchieveViewController(coordinator: AchieveCoordinator) -> AchievementViewController - func makeAchieveDetailViewController(coordinator: AchieveCoordinator, date: String) -> DetailAchievementViewController -} - -protocol TabBarControllerFactory { - func makeTabBarController(_ navigationController: UINavigationController) -> (UITabBarController, [UINavigationController]) -} - final class ViewControllerFactoryImpl: ViewControllerFactory {} - -// update -extension ViewControllerFactoryImpl { - func makeUpdateCheckViewController(coordinator: UpdateCoordinator) -> UpdateCheckViewController { - let viewController = UpdateCheckViewController(coordinator: coordinator) - return viewController - } -} -// onboarding -extension ViewControllerFactoryImpl { - func makeValueOnboardingViewController(coordinator: AuthCoordinator) -> ValueOnboardingViewController { - let viewController = ValueOnboardingViewController(coordinator: coordinator) - return viewController - } - func makeLogoOnboardingViewController(coordinator: AuthCoordinator) -> LogoOnboardingViewController { - let viewController = LogoOnboardingViewController(coordinator: coordinator) - return viewController - } - func makeSecondOnboardingViewController(coordinator: AuthCoordinator) -> SecondOnboardingViewController { - let viewController = SecondOnboardingViewController(coordinator: coordinator) - return viewController - } - func makeThirdOnboardingViewController(coordinator: AuthCoordinator) -> ThirdOnboardingViewController { - let viewController = ThirdOnboardingViewController(coordinator: coordinator) - return viewController - } - func makeFourthOnboardingViewController(coordinator: AuthCoordinator) -> FourthOnboardingViewController { - let viewController = FourthOnboardingViewController(coordinator: coordinator) - return viewController - } - func makeFifthOnboardingViewController(coordinator: AuthCoordinator) -> FifthOnboardingViewController { - let viewController = FifthOnboardingViewController(coordinator: coordinator) - return viewController - } -} -// auth -extension ViewControllerFactoryImpl { - func makeAuthViewController(coordinator: AuthCoordinator) -> AuthViewController { - let viewController = AuthViewController(coordinator: coordinator) - return viewController - } - - func makeNotificationDialogViewController(coordinator: AuthCoordinator, completion: @escaping () -> Void) -> NotificationDialogViewController { - let viewController = NotificationDialogViewController() - viewController.buttonHandler = { - completion() - } - return viewController - } -} -// home -extension ViewControllerFactoryImpl { - func makePopupViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> CommonNotificationViewController { - let viewController = CommonNotificationViewController(coordinator: coordinator) - viewController.tapCloseButton = { - completion() - } - return viewController - } - - func makeHomeViewController(coordinator: HomeCoordinator) -> HomeViewController { - let viewController = HomeViewController(coordinator: coordinator) - return viewController - } -} - -// add mission -extension ViewControllerFactoryImpl { - - func makeRecommendViewController(coordinator: HomeCoordinator, date: String) -> RecommendViewController { - let viewController = RecommendViewController(coordinator: coordinator) - viewController.setSelectDate(date) - return viewController - } - - func makeRecommendDetailViewController(coordinator: HomeCoordinator, data: RecommendActionData) -> RecommendActionViewController { - let viewController = RecommendActionViewController(coordinator: coordinator) - viewController.actionHeaderData = data - return viewController - } - - func makeAddViewController(coordinator: HomeCoordinator, data: AddMissionData, type: MissionType) -> AddMissionViewController { - let viewController = AddMissionViewController(coordinator: coordinator) - viewController.setViewType(type) - viewController.setNottodoLabel(data.nottodo ?? "") - viewController.setSituationLabel(data.situation ?? "") - viewController.setActionLabel(data.action ?? "") - viewController.setDate(data.date) - - return viewController - } -} -// home detail -extension ViewControllerFactoryImpl { - func makeDeleteViewController(coordinator: HomeCoordinator, completion: @escaping () -> Void) -> HomeDeleteViewController { - let viewController = HomeDeleteViewController(coordinator: coordinator) - viewController.deleteClosure = { - completion() - } - return viewController - } - - func makeMissionDetailViewController(coordinator: HomeCoordinator, id: Int, deleteClosure: @escaping () -> Void, moveDateClosure: @escaping (String) -> Void) -> MissionDetailViewController { - let viewController = MissionDetailViewController(coordinator: coordinator) - viewController.userId = id - viewController.deleteClosure = { - deleteClosure() - } - viewController.moveDateClosure = { date in - moveDateClosure(date) - } - return viewController - } - - func makeModifyViewController(coordinator: HomeCoordinator, id: Int = 0, type: MissionType) -> AddMissionViewController { - let viewController = AddMissionViewController(coordinator: coordinator) - viewController.setViewType(type) - viewController.setMissionId(id) - return viewController - } - - func makeSelectDateViewController(coordinator: HomeCoordinator, data: MissionDetailResponseDTO, id: Int, moveDateClosure: @escaping (String) -> Void) -> DetailCalendarViewController { - let viewController = DetailCalendarViewController(coordinator: coordinator) - viewController.detailModel = data - viewController.userId = id - viewController.movedateClosure = { date in - moveDateClosure(date) - } - return viewController - } -} -// mypage -extension ViewControllerFactoryImpl { - func makeMyInfoViewController(coordinator: MypageCoordinator) -> MyInfoViewController { - let viewController = MyInfoViewController(coordinator: coordinator) - return viewController - } - - func makeMyInfoAccountViewController(coordinator: MypageCoordinator) -> MyInfoAccountViewController { - let viewController = MyInfoAccountViewController(coordinator: coordinator) - return viewController - } - - func makeWithdrawViewController(coordinator: MypageCoordinator) -> NottodoModalViewController { - let viewController = NottodoModalViewController(coordinator: coordinator) - return viewController - } -} -// achieve -extension ViewControllerFactoryImpl { - func makeAchieveViewController(coordinator: AchieveCoordinator) -> AchievementViewController { - let missionAPI = DefaultMissionService() - let manager = AchieveManagerImpl(missionAPI: missionAPI) - let viewModel = AchievementViewModelImpl(coordinator: coordinator, manager: manager) - let viewController = AchievementViewController(viewModel: viewModel) - return viewController - } - - func makeAchieveDetailViewController(coordinator: AchieveCoordinator, date: String) -> DetailAchievementViewController { - let missionAPI = DefaultMissionService() - let manager = AchieveManagerImpl(missionAPI: missionAPI) - let viewModel = DetailAchievementViewModelImpl(coordinator: coordinator, manager: manager) - viewModel.selectedDate(date) - let viewController = DetailAchievementViewController(viewModel: viewModel) - return viewController - } -} -// tabbar -extension ViewControllerFactoryImpl { - func makeTabBarController(_: UINavigationController) -> (UITabBarController, [UINavigationController]) { - let tabBarController = TabBarController() - let navigationControllers = tabBarController.setTabBarItems().map(makeNavigationController) - - return (tabBarController, navigationControllers) - } - - func makeNavigationController(_ tabBarItem: UITabBarItem) -> UINavigationController { - let navigationController = UINavigationController() - navigationController.tabBarItem = tabBarItem - navigationController.setNavigationBarHidden(true, animated: false) - return navigationController - } -} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift index 0997a85b..648d1ecf 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift @@ -12,7 +12,7 @@ import FSCalendar import Then import SnapKit -final class AchievementViewController: UIViewController, AchievementViewModelPresentable { +final class AchievementViewController: UIViewController { // MARK: - Properties From 69e59bb3e9cb6578b4f4cfb6c45ccbb06911bcf3 Mon Sep 17 00:00:00 2001 From: jeongdung-eo Date: Sat, 23 Mar 2024 18:17:23 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20#241=20-=20=EB=A6=B0=ED=8A=B8=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Coordinator/Factory/AuthViewControllerFactory.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift index 87ac3689..f30455f3 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift @@ -49,4 +49,3 @@ extension ViewControllerFactoryImpl { return viewController } } -