From 72e8be55ef560081aaa8935a46d01edd3f9d9e6f Mon Sep 17 00:00:00 2001 From: Xerath Date: Thu, 30 Nov 2023 13:45:52 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Coordinator=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=EC=97=90=20Workspace=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20?= =?UTF-8?q?dump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MusicSpot.xcodeproj/project.pbxproj | 102 ++++++++++++------ iOS/MusicSpot/MusicSpot/SceneDelegate.swift | 10 +- .../SpotViewController.swift | 19 +--- 3 files changed, 80 insertions(+), 51 deletions(-) diff --git a/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj b/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj index eb963dc..1fbc183 100644 --- a/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj +++ b/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj @@ -7,6 +7,20 @@ objects = { /* Begin PBXBuildFile section */ + 08CBF8782B18468E007D3797 /* SaveJourneyCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8702B18468E007D3797 /* SaveJourneyCoordinator.swift */; }; + 08CBF8792B18468E007D3797 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8712B18468E007D3797 /* AppCoordinator.swift */; }; + 08CBF87A2B18468E007D3797 /* RewindCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8722B18468E007D3797 /* RewindCoordinator.swift */; }; + 08CBF87B2B18468E007D3797 /* HomeMapCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8732B18468E007D3797 /* HomeMapCoordinator.swift */; }; + 08CBF87C2B18468E007D3797 /* SettingCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8742B18468E007D3797 /* SettingCoordinator.swift */; }; + 08CBF87D2B18468E007D3797 /* SpotCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8752B18468E007D3797 /* SpotCoordinator.swift */; }; + 08CBF87E2B18468E007D3797 /* SearchMusicCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8762B18468E007D3797 /* SearchMusicCoordinator.swift */; }; + 08CBF87F2B18468E007D3797 /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8772B18468E007D3797 /* Coordinator.swift */; }; + 08CBF8872B1846A0007D3797 /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8812B1846A0007D3797 /* SettingViewController.swift */; }; + 08CBF8882B1846A0007D3797 /* HomeMapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8822B1846A0007D3797 /* HomeMapViewController.swift */; }; + 08CBF8892B1846A0007D3797 /* SaveJourneyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8832B1846A0007D3797 /* SaveJourneyViewController.swift */; }; + 08CBF88A2B1846A0007D3797 /* SpotViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8842B1846A0007D3797 /* SpotViewController.swift */; }; + 08CBF88B2B1846A0007D3797 /* RewindViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8852B1846A0007D3797 /* RewindViewController.swift */; }; + 08CBF88C2B1846A0007D3797 /* SearchMusicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8862B1846A0007D3797 /* SearchMusicViewController.swift */; }; DD5EA2552B16EC920080AEC1 /* JourneyList in Frameworks */ = {isa = PBXBuildFile; productRef = DD5EA2542B16EC920080AEC1 /* JourneyList */; }; DD5EA2572B16EC960080AEC1 /* NavigateMap in Frameworks */ = {isa = PBXBuildFile; productRef = DD5EA2562B16EC960080AEC1 /* NavigateMap */; }; DD5EA2592B16EC9B0080AEC1 /* RecordJourney in Frameworks */ = {isa = PBXBuildFile; productRef = DD5EA2582B16EC9B0080AEC1 /* RecordJourney */; }; @@ -21,20 +35,20 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 08BA0C802B15533A00BD0829 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; - 08BA0CDA2B15D38400BD0829 /* RewindCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RewindCoordinator.swift; sourceTree = ""; }; - 08BA0CDD2B15D57600BD0829 /* HomeMapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeMapViewController.swift; sourceTree = ""; }; - 08BA0CDF2B15D6AB00BD0829 /* RewindViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RewindViewController.swift; sourceTree = ""; }; - 08BA0CE12B15D72800BD0829 /* HomeMapCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeMapCoordinator.swift; sourceTree = ""; }; - 08BA0CE32B15DAAA00BD0829 /* SettingCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingCoordinator.swift; sourceTree = ""; }; - 08BA0CE52B15DBD000BD0829 /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; }; - 08BA0CE72B15EB8300BD0829 /* SpotCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotCoordinator.swift; sourceTree = ""; }; - 08BA0CE92B15EBDC00BD0829 /* SpotViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotViewController.swift; sourceTree = ""; }; - 08BA0CEB2B1660CD00BD0829 /* Coordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = ""; }; - 08BA0CEF2B17693E00BD0829 /* SearchMusicCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchMusicCoordinator.swift; sourceTree = ""; }; - 08BA0CF12B17699B00BD0829 /* SearchMusicViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchMusicViewController.swift; sourceTree = ""; }; - 08BA0CF32B176A8300BD0829 /* SaveJourneyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SaveJourneyViewController.swift; sourceTree = ""; }; - 08BA0CF52B176B2F00BD0829 /* SaveJourneyCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SaveJourneyCoordinator.swift; sourceTree = ""; }; + 08CBF8702B18468E007D3797 /* SaveJourneyCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SaveJourneyCoordinator.swift; sourceTree = ""; }; + 08CBF8712B18468E007D3797 /* AppCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 08CBF8722B18468E007D3797 /* RewindCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewindCoordinator.swift; sourceTree = ""; }; + 08CBF8732B18468E007D3797 /* HomeMapCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMapCoordinator.swift; sourceTree = ""; }; + 08CBF8742B18468E007D3797 /* SettingCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingCoordinator.swift; sourceTree = ""; }; + 08CBF8752B18468E007D3797 /* SpotCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpotCoordinator.swift; sourceTree = ""; }; + 08CBF8762B18468E007D3797 /* SearchMusicCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchMusicCoordinator.swift; sourceTree = ""; }; + 08CBF8772B18468E007D3797 /* Coordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = ""; }; + 08CBF8812B1846A0007D3797 /* SettingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; }; + 08CBF8822B1846A0007D3797 /* HomeMapViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMapViewController.swift; sourceTree = ""; }; + 08CBF8832B1846A0007D3797 /* SaveJourneyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SaveJourneyViewController.swift; sourceTree = ""; }; + 08CBF8842B1846A0007D3797 /* SpotViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpotViewController.swift; sourceTree = ""; }; + 08CBF8852B1846A0007D3797 /* RewindViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewindViewController.swift; sourceTree = ""; }; + 08CBF8862B1846A0007D3797 /* SearchMusicViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchMusicViewController.swift; sourceTree = ""; }; DD73F8552B024C4900EE9BF2 /* MusicSpot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MusicSpot.app; sourceTree = BUILT_PRODUCTS_DIR; }; DD73F8582B024C4900EE9BF2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; DD73F85A2B024C4900EE9BF2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -62,6 +76,34 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 08CBF86F2B18468E007D3797 /* MSCoordinator */ = { + isa = PBXGroup; + children = ( + 08CBF8702B18468E007D3797 /* SaveJourneyCoordinator.swift */, + 08CBF8712B18468E007D3797 /* AppCoordinator.swift */, + 08CBF8722B18468E007D3797 /* RewindCoordinator.swift */, + 08CBF8732B18468E007D3797 /* HomeMapCoordinator.swift */, + 08CBF8742B18468E007D3797 /* SettingCoordinator.swift */, + 08CBF8752B18468E007D3797 /* SpotCoordinator.swift */, + 08CBF8762B18468E007D3797 /* SearchMusicCoordinator.swift */, + 08CBF8772B18468E007D3797 /* Coordinator.swift */, + ); + path = MSCoordinator; + sourceTree = ""; + }; + 08CBF8802B1846A0007D3797 /* TempViewController */ = { + isa = PBXGroup; + children = ( + 08CBF8812B1846A0007D3797 /* SettingViewController.swift */, + 08CBF8822B1846A0007D3797 /* HomeMapViewController.swift */, + 08CBF8832B1846A0007D3797 /* SaveJourneyViewController.swift */, + 08CBF8842B1846A0007D3797 /* SpotViewController.swift */, + 08CBF8852B1846A0007D3797 /* RewindViewController.swift */, + 08CBF8862B1846A0007D3797 /* SearchMusicViewController.swift */, + ); + path = TempViewController; + sourceTree = ""; + }; DD5EA23F2B16EC690080AEC1 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -89,8 +131,8 @@ DD73F8572B024C4900EE9BF2 /* MusicSpot */ = { isa = PBXGroup; children = ( - 08BA0CDC2B15D54D00BD0829 /* TempViewController */, - 089F29782B154CF10065E77B /* MSCoordinator */, + 08CBF8802B1846A0007D3797 /* TempViewController */, + 08CBF86F2B18468E007D3797 /* MSCoordinator */, DD73F8582B024C4900EE9BF2 /* AppDelegate.swift */, DD73F85A2B024C4900EE9BF2 /* SceneDelegate.swift */, DD73F8612B024C4B00EE9BF2 /* Assets.xcassets */, @@ -187,22 +229,22 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 08BA0CEA2B15EBDC00BD0829 /* SpotViewController.swift in Sources */, - 08BA0C812B15533A00BD0829 /* AppCoordinator.swift in Sources */, - 08BA0CE02B15D6AB00BD0829 /* RewindViewController.swift in Sources */, + 08CBF88C2B1846A0007D3797 /* SearchMusicViewController.swift in Sources */, + 08CBF8882B1846A0007D3797 /* HomeMapViewController.swift in Sources */, + 08CBF8792B18468E007D3797 /* AppCoordinator.swift in Sources */, + 08CBF8872B1846A0007D3797 /* SettingViewController.swift in Sources */, + 08CBF8782B18468E007D3797 /* SaveJourneyCoordinator.swift in Sources */, + 08CBF87F2B18468E007D3797 /* Coordinator.swift in Sources */, + 08CBF88B2B1846A0007D3797 /* RewindViewController.swift in Sources */, + 08CBF8892B1846A0007D3797 /* SaveJourneyViewController.swift in Sources */, + 08CBF88A2B1846A0007D3797 /* SpotViewController.swift in Sources */, + 08CBF87D2B18468E007D3797 /* SpotCoordinator.swift in Sources */, + 08CBF87E2B18468E007D3797 /* SearchMusicCoordinator.swift in Sources */, + 08CBF87A2B18468E007D3797 /* RewindCoordinator.swift in Sources */, + 08CBF87C2B18468E007D3797 /* SettingCoordinator.swift in Sources */, DD73F8592B024C4900EE9BF2 /* AppDelegate.swift in Sources */, - 08BA0CF42B176A8300BD0829 /* SaveJourneyViewController.swift in Sources */, - 08BA0CE22B15D72800BD0829 /* HomeMapCoordinator.swift in Sources */, - 08BA0CF62B176B2F00BD0829 /* SaveJourneyCoordinator.swift in Sources */, + 08CBF87B2B18468E007D3797 /* HomeMapCoordinator.swift in Sources */, DD73F85B2B024C4900EE9BF2 /* SceneDelegate.swift in Sources */, - 08BA0CE62B15DBD000BD0829 /* SettingViewController.swift in Sources */, - 08BA0CDB2B15D38400BD0829 /* RewindCoordinator.swift in Sources */, - 08BA0CF22B17699B00BD0829 /* SearchMusicViewController.swift in Sources */, - 08BA0CEC2B1660CD00BD0829 /* Coordinator.swift in Sources */, - 08BA0CDE2B15D57600BD0829 /* HomeMapViewController.swift in Sources */, - 08BA0CE82B15EB8300BD0829 /* SpotCoordinator.swift in Sources */, - 08BA0CF02B17693E00BD0829 /* SearchMusicCoordinator.swift in Sources */, - 08BA0CE42B15DAAA00BD0829 /* SettingCoordinator.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift index 0f347bb..cbe307e 100644 --- a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift +++ b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift @@ -14,7 +14,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? // MARK: - Functions - + func scene(_ scene: UIScene, willConnectTo _: UISceneSession, options _: UIScene.ConnectionOptions) { @@ -22,8 +22,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { let window = UIWindow(windowScene: windowScene) defer { self.window = window } - let testViewController = UIViewController() - window.rootViewController = testViewController + let musicSpotNavigationController = UINavigationController() + let appCoordinator = AppCoordinator(navigationController: musicSpotNavigationController) + window.rootViewController = musicSpotNavigationController + + appCoordinator.start() + window.makeKeyAndVisible() } diff --git a/iOS/MusicSpot/MusicSpot/TempViewController/SpotViewController.swift b/iOS/MusicSpot/MusicSpot/TempViewController/SpotViewController.swift index a34424b..8b70cdb 100644 --- a/iOS/MusicSpot/MusicSpot/TempViewController/SpotViewController.swift +++ b/iOS/MusicSpot/MusicSpot/TempViewController/SpotViewController.swift @@ -36,16 +36,6 @@ class SpotViewController: UIViewController { return button }() - var numberButton: UIButton = { - let button = UIButton() - - button.setTitle("더하기", for: .normal) - button.layer.cornerRadius = 8 - button.backgroundColor = .lightGray - - return button - }() - // MARK: - Life Cycle override func viewDidLoad() { @@ -61,7 +51,6 @@ class SpotViewController: UIViewController { private func configureStyle() { self.view.addSubview(titleLabel) self.view.addSubview(startButton) - self.view.addSubview(numberButton) self.startButton.addTarget(self, action: #selector(navigateToHomeMap), for: .touchUpInside) } @@ -69,7 +58,6 @@ class SpotViewController: UIViewController { private func configureLayout() { titleLabel.translatesAutoresizingMaskIntoConstraints = false startButton.translatesAutoresizingMaskIntoConstraints = false - numberButton.translatesAutoresizingMaskIntoConstraints = false let safeArea = view.safeAreaLayoutGuide @@ -79,12 +67,7 @@ class SpotViewController: UIViewController { startButton.trailingAnchor.constraint(equalTo: safeArea.trailingAnchor, constant: -100), startButton.heightAnchor.constraint(equalToConstant: 50), - numberButton.topAnchor.constraint(equalTo: startButton.bottomAnchor, constant: 40), - numberButton.leadingAnchor.constraint(equalTo: safeArea.leadingAnchor, constant: 100), - numberButton.trailingAnchor.constraint(equalTo: safeArea.trailingAnchor, constant: -100), - numberButton.heightAnchor.constraint(equalToConstant: 50), - - titleLabel.topAnchor.constraint(equalTo: numberButton.bottomAnchor, constant: 40), + titleLabel.topAnchor.constraint(equalTo: startButton.bottomAnchor, constant: 40), titleLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor), titleLabel.heightAnchor.constraint(equalToConstant: 50) ])