├── .gitignore ├── CoordinatorPractice ├── CoordinatorPractice.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── CoordinatorPractice │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Coordinator │ │ ├── BuyCoordinator.swift │ │ ├── Coordinator.swift │ │ └── MainCoordinator.swift │ ├── CoordinatorPractice.xcdatamodeld │ │ ├── .xccurrentversion │ │ └── CoordinatorPractice.xcdatamodel │ │ │ └── contents │ ├── Info.plist │ ├── Storyboarded.swift │ └── ViewController │ │ ├── BuyViewController.swift │ │ ├── CreateAccountViewController.swift │ │ └── ViewController.swift ├── CoordinatorPracticeTests │ ├── CoordinatorPracticeTests.swift │ └── Info.plist └── CoordinatorPracticeUITests │ ├── CoordinatorPracticeUITests.swift │ └── Info.plist ├── Media └── coordinator_basic.gif └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6AD3EDCD2552A00800F8EF61 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EDCC2552A00800F8EF61 /* AppDelegate.swift */; }; 11 | 6AD3EDD12552A00800F8EF61 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EDD02552A00800F8EF61 /* ViewController.swift */; }; 12 | 6AD3EDD42552A00800F8EF61 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD3EDD22552A00800F8EF61 /* Main.storyboard */; }; 13 | 6AD3EDD72552A00800F8EF61 /* CoordinatorPractice.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EDD52552A00800F8EF61 /* CoordinatorPractice.xcdatamodeld */; }; 14 | 6AD3EDD92552A00900F8EF61 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6AD3EDD82552A00900F8EF61 /* Assets.xcassets */; }; 15 | 6AD3EDDC2552A00900F8EF61 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD3EDDA2552A00900F8EF61 /* LaunchScreen.storyboard */; }; 16 | 6AD3EDE72552A00900F8EF61 /* CoordinatorPracticeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EDE62552A00900F8EF61 /* CoordinatorPracticeTests.swift */; }; 17 | 6AD3EDF22552A00A00F8EF61 /* CoordinatorPracticeUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EDF12552A00A00F8EF61 /* CoordinatorPracticeUITests.swift */; }; 18 | 6AD3EE032552A02800F8EF61 /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE022552A02800F8EF61 /* Coordinator.swift */; }; 19 | 6AD3EE082552A04A00F8EF61 /* Storyboarded.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE072552A04A00F8EF61 /* Storyboarded.swift */; }; 20 | 6AD3EE0E2552A08C00F8EF61 /* MainCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE0D2552A08C00F8EF61 /* MainCoordinator.swift */; }; 21 | 6AD3EE162552A13500F8EF61 /* BuyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE152552A13500F8EF61 /* BuyViewController.swift */; }; 22 | 6AD3EE1B2552A17300F8EF61 /* CreateAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE1A2552A17300F8EF61 /* CreateAccountViewController.swift */; }; 23 | 6AD3EE5B2552E99100F8EF61 /* BuyCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD3EE5A2552E99100F8EF61 /* BuyCoordinator.swift */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 6AD3EDE32552A00900F8EF61 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 6AD3EDC12552A00800F8EF61 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 6AD3EDC82552A00800F8EF61; 32 | remoteInfo = CoordinatorPractice; 33 | }; 34 | 6AD3EDEE2552A00900F8EF61 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 6AD3EDC12552A00800F8EF61 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 6AD3EDC82552A00800F8EF61; 39 | remoteInfo = CoordinatorPractice; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 6AD3EDC92552A00800F8EF61 /* CoordinatorPractice.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoordinatorPractice.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 6AD3EDCC2552A00800F8EF61 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46 | 6AD3EDD02552A00800F8EF61 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 47 | 6AD3EDD32552A00800F8EF61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 6AD3EDD62552A00800F8EF61 /* CoordinatorPractice.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = CoordinatorPractice.xcdatamodel; sourceTree = ""; }; 49 | 6AD3EDD82552A00900F8EF61 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 6AD3EDDB2552A00900F8EF61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 6AD3EDDD2552A00900F8EF61 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 6AD3EDE22552A00900F8EF61 /* CoordinatorPracticeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoordinatorPracticeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 6AD3EDE62552A00900F8EF61 /* CoordinatorPracticeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoordinatorPracticeTests.swift; sourceTree = ""; }; 54 | 6AD3EDE82552A00900F8EF61 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 6AD3EDED2552A00900F8EF61 /* CoordinatorPracticeUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoordinatorPracticeUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 6AD3EDF12552A00A00F8EF61 /* CoordinatorPracticeUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoordinatorPracticeUITests.swift; sourceTree = ""; }; 57 | 6AD3EDF32552A00A00F8EF61 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 6AD3EE022552A02800F8EF61 /* Coordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = ""; }; 59 | 6AD3EE072552A04A00F8EF61 /* Storyboarded.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storyboarded.swift; sourceTree = ""; }; 60 | 6AD3EE0D2552A08C00F8EF61 /* MainCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainCoordinator.swift; sourceTree = ""; }; 61 | 6AD3EE152552A13500F8EF61 /* BuyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuyViewController.swift; sourceTree = ""; }; 62 | 6AD3EE1A2552A17300F8EF61 /* CreateAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateAccountViewController.swift; sourceTree = ""; }; 63 | 6AD3EE5A2552E99100F8EF61 /* BuyCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuyCoordinator.swift; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | 6AD3EDC62552A00800F8EF61 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 6AD3EDDF2552A00900F8EF61 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 6AD3EDEA2552A00900F8EF61 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 6AD3EDC02552A00800F8EF61 = { 92 | isa = PBXGroup; 93 | children = ( 94 | 6AD3EDCB2552A00800F8EF61 /* CoordinatorPractice */, 95 | 6AD3EDE52552A00900F8EF61 /* CoordinatorPracticeTests */, 96 | 6AD3EDF02552A00900F8EF61 /* CoordinatorPracticeUITests */, 97 | 6AD3EDCA2552A00800F8EF61 /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | 6AD3EDCA2552A00800F8EF61 /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6AD3EDC92552A00800F8EF61 /* CoordinatorPractice.app */, 105 | 6AD3EDE22552A00900F8EF61 /* CoordinatorPracticeTests.xctest */, 106 | 6AD3EDED2552A00900F8EF61 /* CoordinatorPracticeUITests.xctest */, 107 | ); 108 | name = Products; 109 | sourceTree = ""; 110 | }; 111 | 6AD3EDCB2552A00800F8EF61 /* CoordinatorPractice */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 6AD3EE4D2552E61300F8EF61 /* ViewController */, 115 | 6AD3EE0C2552A07400F8EF61 /* Coordinator */, 116 | 6AD3EDCC2552A00800F8EF61 /* AppDelegate.swift */, 117 | 6AD3EE072552A04A00F8EF61 /* Storyboarded.swift */, 118 | 6AD3EDD22552A00800F8EF61 /* Main.storyboard */, 119 | 6AD3EDD82552A00900F8EF61 /* Assets.xcassets */, 120 | 6AD3EDDA2552A00900F8EF61 /* LaunchScreen.storyboard */, 121 | 6AD3EDDD2552A00900F8EF61 /* Info.plist */, 122 | 6AD3EDD52552A00800F8EF61 /* CoordinatorPractice.xcdatamodeld */, 123 | ); 124 | path = CoordinatorPractice; 125 | sourceTree = ""; 126 | }; 127 | 6AD3EDE52552A00900F8EF61 /* CoordinatorPracticeTests */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 6AD3EDE62552A00900F8EF61 /* CoordinatorPracticeTests.swift */, 131 | 6AD3EDE82552A00900F8EF61 /* Info.plist */, 132 | ); 133 | path = CoordinatorPracticeTests; 134 | sourceTree = ""; 135 | }; 136 | 6AD3EDF02552A00900F8EF61 /* CoordinatorPracticeUITests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 6AD3EDF12552A00A00F8EF61 /* CoordinatorPracticeUITests.swift */, 140 | 6AD3EDF32552A00A00F8EF61 /* Info.plist */, 141 | ); 142 | path = CoordinatorPracticeUITests; 143 | sourceTree = ""; 144 | }; 145 | 6AD3EE0C2552A07400F8EF61 /* Coordinator */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 6AD3EE022552A02800F8EF61 /* Coordinator.swift */, 149 | 6AD3EE0D2552A08C00F8EF61 /* MainCoordinator.swift */, 150 | 6AD3EE5A2552E99100F8EF61 /* BuyCoordinator.swift */, 151 | ); 152 | path = Coordinator; 153 | sourceTree = ""; 154 | }; 155 | 6AD3EE4D2552E61300F8EF61 /* ViewController */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 6AD3EDD02552A00800F8EF61 /* ViewController.swift */, 159 | 6AD3EE152552A13500F8EF61 /* BuyViewController.swift */, 160 | 6AD3EE1A2552A17300F8EF61 /* CreateAccountViewController.swift */, 161 | ); 162 | path = ViewController; 163 | sourceTree = ""; 164 | }; 165 | /* End PBXGroup section */ 166 | 167 | /* Begin PBXNativeTarget section */ 168 | 6AD3EDC82552A00800F8EF61 /* CoordinatorPractice */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 6AD3EDF62552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPractice" */; 171 | buildPhases = ( 172 | 6AD3EDC52552A00800F8EF61 /* Sources */, 173 | 6AD3EDC62552A00800F8EF61 /* Frameworks */, 174 | 6AD3EDC72552A00800F8EF61 /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | ); 180 | name = CoordinatorPractice; 181 | productName = CoordinatorPractice; 182 | productReference = 6AD3EDC92552A00800F8EF61 /* CoordinatorPractice.app */; 183 | productType = "com.apple.product-type.application"; 184 | }; 185 | 6AD3EDE12552A00900F8EF61 /* CoordinatorPracticeTests */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 6AD3EDF92552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPracticeTests" */; 188 | buildPhases = ( 189 | 6AD3EDDE2552A00900F8EF61 /* Sources */, 190 | 6AD3EDDF2552A00900F8EF61 /* Frameworks */, 191 | 6AD3EDE02552A00900F8EF61 /* Resources */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | 6AD3EDE42552A00900F8EF61 /* PBXTargetDependency */, 197 | ); 198 | name = CoordinatorPracticeTests; 199 | productName = CoordinatorPracticeTests; 200 | productReference = 6AD3EDE22552A00900F8EF61 /* CoordinatorPracticeTests.xctest */; 201 | productType = "com.apple.product-type.bundle.unit-test"; 202 | }; 203 | 6AD3EDEC2552A00900F8EF61 /* CoordinatorPracticeUITests */ = { 204 | isa = PBXNativeTarget; 205 | buildConfigurationList = 6AD3EDFC2552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPracticeUITests" */; 206 | buildPhases = ( 207 | 6AD3EDE92552A00900F8EF61 /* Sources */, 208 | 6AD3EDEA2552A00900F8EF61 /* Frameworks */, 209 | 6AD3EDEB2552A00900F8EF61 /* Resources */, 210 | ); 211 | buildRules = ( 212 | ); 213 | dependencies = ( 214 | 6AD3EDEF2552A00900F8EF61 /* PBXTargetDependency */, 215 | ); 216 | name = CoordinatorPracticeUITests; 217 | productName = CoordinatorPracticeUITests; 218 | productReference = 6AD3EDED2552A00900F8EF61 /* CoordinatorPracticeUITests.xctest */; 219 | productType = "com.apple.product-type.bundle.ui-testing"; 220 | }; 221 | /* End PBXNativeTarget section */ 222 | 223 | /* Begin PBXProject section */ 224 | 6AD3EDC12552A00800F8EF61 /* Project object */ = { 225 | isa = PBXProject; 226 | attributes = { 227 | LastSwiftUpdateCheck = 1210; 228 | LastUpgradeCheck = 1210; 229 | TargetAttributes = { 230 | 6AD3EDC82552A00800F8EF61 = { 231 | CreatedOnToolsVersion = 12.1; 232 | }; 233 | 6AD3EDE12552A00900F8EF61 = { 234 | CreatedOnToolsVersion = 12.1; 235 | TestTargetID = 6AD3EDC82552A00800F8EF61; 236 | }; 237 | 6AD3EDEC2552A00900F8EF61 = { 238 | CreatedOnToolsVersion = 12.1; 239 | TestTargetID = 6AD3EDC82552A00800F8EF61; 240 | }; 241 | }; 242 | }; 243 | buildConfigurationList = 6AD3EDC42552A00800F8EF61 /* Build configuration list for PBXProject "CoordinatorPractice" */; 244 | compatibilityVersion = "Xcode 9.3"; 245 | developmentRegion = en; 246 | hasScannedForEncodings = 0; 247 | knownRegions = ( 248 | en, 249 | Base, 250 | ); 251 | mainGroup = 6AD3EDC02552A00800F8EF61; 252 | productRefGroup = 6AD3EDCA2552A00800F8EF61 /* Products */; 253 | projectDirPath = ""; 254 | projectRoot = ""; 255 | targets = ( 256 | 6AD3EDC82552A00800F8EF61 /* CoordinatorPractice */, 257 | 6AD3EDE12552A00900F8EF61 /* CoordinatorPracticeTests */, 258 | 6AD3EDEC2552A00900F8EF61 /* CoordinatorPracticeUITests */, 259 | ); 260 | }; 261 | /* End PBXProject section */ 262 | 263 | /* Begin PBXResourcesBuildPhase section */ 264 | 6AD3EDC72552A00800F8EF61 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 6AD3EDDC2552A00900F8EF61 /* LaunchScreen.storyboard in Resources */, 269 | 6AD3EDD92552A00900F8EF61 /* Assets.xcassets in Resources */, 270 | 6AD3EDD42552A00800F8EF61 /* Main.storyboard in Resources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | 6AD3EDE02552A00900F8EF61 /* Resources */ = { 275 | isa = PBXResourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | 6AD3EDEB2552A00900F8EF61 /* Resources */ = { 282 | isa = PBXResourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXResourcesBuildPhase section */ 289 | 290 | /* Begin PBXSourcesBuildPhase section */ 291 | 6AD3EDC52552A00800F8EF61 /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 6AD3EE5B2552E99100F8EF61 /* BuyCoordinator.swift in Sources */, 296 | 6AD3EDD12552A00800F8EF61 /* ViewController.swift in Sources */, 297 | 6AD3EE162552A13500F8EF61 /* BuyViewController.swift in Sources */, 298 | 6AD3EE0E2552A08C00F8EF61 /* MainCoordinator.swift in Sources */, 299 | 6AD3EDCD2552A00800F8EF61 /* AppDelegate.swift in Sources */, 300 | 6AD3EE032552A02800F8EF61 /* Coordinator.swift in Sources */, 301 | 6AD3EDD72552A00800F8EF61 /* CoordinatorPractice.xcdatamodeld in Sources */, 302 | 6AD3EE1B2552A17300F8EF61 /* CreateAccountViewController.swift in Sources */, 303 | 6AD3EE082552A04A00F8EF61 /* Storyboarded.swift in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | 6AD3EDDE2552A00900F8EF61 /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | 6AD3EDE72552A00900F8EF61 /* CoordinatorPracticeTests.swift in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | 6AD3EDE92552A00900F8EF61 /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 6AD3EDF22552A00A00F8EF61 /* CoordinatorPracticeUITests.swift in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin PBXTargetDependency section */ 326 | 6AD3EDE42552A00900F8EF61 /* PBXTargetDependency */ = { 327 | isa = PBXTargetDependency; 328 | target = 6AD3EDC82552A00800F8EF61 /* CoordinatorPractice */; 329 | targetProxy = 6AD3EDE32552A00900F8EF61 /* PBXContainerItemProxy */; 330 | }; 331 | 6AD3EDEF2552A00900F8EF61 /* PBXTargetDependency */ = { 332 | isa = PBXTargetDependency; 333 | target = 6AD3EDC82552A00800F8EF61 /* CoordinatorPractice */; 334 | targetProxy = 6AD3EDEE2552A00900F8EF61 /* PBXContainerItemProxy */; 335 | }; 336 | /* End PBXTargetDependency section */ 337 | 338 | /* Begin PBXVariantGroup section */ 339 | 6AD3EDD22552A00800F8EF61 /* Main.storyboard */ = { 340 | isa = PBXVariantGroup; 341 | children = ( 342 | 6AD3EDD32552A00800F8EF61 /* Base */, 343 | ); 344 | name = Main.storyboard; 345 | sourceTree = ""; 346 | }; 347 | 6AD3EDDA2552A00900F8EF61 /* LaunchScreen.storyboard */ = { 348 | isa = PBXVariantGroup; 349 | children = ( 350 | 6AD3EDDB2552A00900F8EF61 /* Base */, 351 | ); 352 | name = LaunchScreen.storyboard; 353 | sourceTree = ""; 354 | }; 355 | /* End PBXVariantGroup section */ 356 | 357 | /* Begin XCBuildConfiguration section */ 358 | 6AD3EDF42552A00A00F8EF61 /* Debug */ = { 359 | isa = XCBuildConfiguration; 360 | buildSettings = { 361 | ALWAYS_SEARCH_USER_PATHS = NO; 362 | CLANG_ANALYZER_NONNULL = YES; 363 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 364 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 365 | CLANG_CXX_LIBRARY = "libc++"; 366 | CLANG_ENABLE_MODULES = YES; 367 | CLANG_ENABLE_OBJC_ARC = YES; 368 | CLANG_ENABLE_OBJC_WEAK = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 386 | CLANG_WARN_STRICT_PROTOTYPES = YES; 387 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 388 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 389 | CLANG_WARN_UNREACHABLE_CODE = YES; 390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 391 | COPY_PHASE_STRIP = NO; 392 | DEBUG_INFORMATION_FORMAT = dwarf; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | ENABLE_TESTABILITY = YES; 395 | GCC_C_LANGUAGE_STANDARD = gnu11; 396 | GCC_DYNAMIC_NO_PIC = NO; 397 | GCC_NO_COMMON_BLOCKS = YES; 398 | GCC_OPTIMIZATION_LEVEL = 0; 399 | GCC_PREPROCESSOR_DEFINITIONS = ( 400 | "DEBUG=1", 401 | "$(inherited)", 402 | ); 403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 405 | GCC_WARN_UNDECLARED_SELECTOR = YES; 406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 407 | GCC_WARN_UNUSED_FUNCTION = YES; 408 | GCC_WARN_UNUSED_VARIABLE = YES; 409 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 410 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 411 | MTL_FAST_MATH = YES; 412 | ONLY_ACTIVE_ARCH = YES; 413 | SDKROOT = iphoneos; 414 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 415 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 416 | }; 417 | name = Debug; 418 | }; 419 | 6AD3EDF52552A00A00F8EF61 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ALWAYS_SEARCH_USER_PATHS = NO; 423 | CLANG_ANALYZER_NONNULL = YES; 424 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 425 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 426 | CLANG_CXX_LIBRARY = "libc++"; 427 | CLANG_ENABLE_MODULES = YES; 428 | CLANG_ENABLE_OBJC_ARC = YES; 429 | CLANG_ENABLE_OBJC_WEAK = YES; 430 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 431 | CLANG_WARN_BOOL_CONVERSION = YES; 432 | CLANG_WARN_COMMA = YES; 433 | CLANG_WARN_CONSTANT_CONVERSION = YES; 434 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 435 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 436 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 437 | CLANG_WARN_EMPTY_BODY = YES; 438 | CLANG_WARN_ENUM_CONVERSION = YES; 439 | CLANG_WARN_INFINITE_RECURSION = YES; 440 | CLANG_WARN_INT_CONVERSION = YES; 441 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 442 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 443 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 444 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 445 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 446 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 447 | CLANG_WARN_STRICT_PROTOTYPES = YES; 448 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 449 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 450 | CLANG_WARN_UNREACHABLE_CODE = YES; 451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 452 | COPY_PHASE_STRIP = NO; 453 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 454 | ENABLE_NS_ASSERTIONS = NO; 455 | ENABLE_STRICT_OBJC_MSGSEND = YES; 456 | GCC_C_LANGUAGE_STANDARD = gnu11; 457 | GCC_NO_COMMON_BLOCKS = YES; 458 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 459 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 460 | GCC_WARN_UNDECLARED_SELECTOR = YES; 461 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 462 | GCC_WARN_UNUSED_FUNCTION = YES; 463 | GCC_WARN_UNUSED_VARIABLE = YES; 464 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 465 | MTL_ENABLE_DEBUG_INFO = NO; 466 | MTL_FAST_MATH = YES; 467 | SDKROOT = iphoneos; 468 | SWIFT_COMPILATION_MODE = wholemodule; 469 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 470 | VALIDATE_PRODUCT = YES; 471 | }; 472 | name = Release; 473 | }; 474 | 6AD3EDF72552A00A00F8EF61 /* Debug */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 478 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 479 | CODE_SIGN_STYLE = Automatic; 480 | DEVELOPMENT_TEAM = 93A6S4WHC4; 481 | INFOPLIST_FILE = CoordinatorPractice/Info.plist; 482 | LD_RUNPATH_SEARCH_PATHS = ( 483 | "$(inherited)", 484 | "@executable_path/Frameworks", 485 | ); 486 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPractice; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | SWIFT_VERSION = 5.0; 489 | TARGETED_DEVICE_FAMILY = "1,2"; 490 | }; 491 | name = Debug; 492 | }; 493 | 6AD3EDF82552A00A00F8EF61 /* Release */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 497 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 498 | CODE_SIGN_STYLE = Automatic; 499 | DEVELOPMENT_TEAM = 93A6S4WHC4; 500 | INFOPLIST_FILE = CoordinatorPractice/Info.plist; 501 | LD_RUNPATH_SEARCH_PATHS = ( 502 | "$(inherited)", 503 | "@executable_path/Frameworks", 504 | ); 505 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPractice; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | SWIFT_VERSION = 5.0; 508 | TARGETED_DEVICE_FAMILY = "1,2"; 509 | }; 510 | name = Release; 511 | }; 512 | 6AD3EDFA2552A00A00F8EF61 /* Debug */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 516 | BUNDLE_LOADER = "$(TEST_HOST)"; 517 | CODE_SIGN_STYLE = Automatic; 518 | DEVELOPMENT_TEAM = 93A6S4WHC4; 519 | INFOPLIST_FILE = CoordinatorPracticeTests/Info.plist; 520 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 521 | LD_RUNPATH_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "@executable_path/Frameworks", 524 | "@loader_path/Frameworks", 525 | ); 526 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPracticeTests; 527 | PRODUCT_NAME = "$(TARGET_NAME)"; 528 | SWIFT_VERSION = 5.0; 529 | TARGETED_DEVICE_FAMILY = "1,2"; 530 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoordinatorPractice.app/CoordinatorPractice"; 531 | }; 532 | name = Debug; 533 | }; 534 | 6AD3EDFB2552A00A00F8EF61 /* Release */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 538 | BUNDLE_LOADER = "$(TEST_HOST)"; 539 | CODE_SIGN_STYLE = Automatic; 540 | DEVELOPMENT_TEAM = 93A6S4WHC4; 541 | INFOPLIST_FILE = CoordinatorPracticeTests/Info.plist; 542 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 543 | LD_RUNPATH_SEARCH_PATHS = ( 544 | "$(inherited)", 545 | "@executable_path/Frameworks", 546 | "@loader_path/Frameworks", 547 | ); 548 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPracticeTests; 549 | PRODUCT_NAME = "$(TARGET_NAME)"; 550 | SWIFT_VERSION = 5.0; 551 | TARGETED_DEVICE_FAMILY = "1,2"; 552 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoordinatorPractice.app/CoordinatorPractice"; 553 | }; 554 | name = Release; 555 | }; 556 | 6AD3EDFD2552A00A00F8EF61 /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 560 | CODE_SIGN_STYLE = Automatic; 561 | DEVELOPMENT_TEAM = 93A6S4WHC4; 562 | INFOPLIST_FILE = CoordinatorPracticeUITests/Info.plist; 563 | LD_RUNPATH_SEARCH_PATHS = ( 564 | "$(inherited)", 565 | "@executable_path/Frameworks", 566 | "@loader_path/Frameworks", 567 | ); 568 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPracticeUITests; 569 | PRODUCT_NAME = "$(TARGET_NAME)"; 570 | SWIFT_VERSION = 5.0; 571 | TARGETED_DEVICE_FAMILY = "1,2"; 572 | TEST_TARGET_NAME = CoordinatorPractice; 573 | }; 574 | name = Debug; 575 | }; 576 | 6AD3EDFE2552A00A00F8EF61 /* Release */ = { 577 | isa = XCBuildConfiguration; 578 | buildSettings = { 579 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 580 | CODE_SIGN_STYLE = Automatic; 581 | DEVELOPMENT_TEAM = 93A6S4WHC4; 582 | INFOPLIST_FILE = CoordinatorPracticeUITests/Info.plist; 583 | LD_RUNPATH_SEARCH_PATHS = ( 584 | "$(inherited)", 585 | "@executable_path/Frameworks", 586 | "@loader_path/Frameworks", 587 | ); 588 | PRODUCT_BUNDLE_IDENTIFIER = com.lena.CoordinatorPracticeUITests; 589 | PRODUCT_NAME = "$(TARGET_NAME)"; 590 | SWIFT_VERSION = 5.0; 591 | TARGETED_DEVICE_FAMILY = "1,2"; 592 | TEST_TARGET_NAME = CoordinatorPractice; 593 | }; 594 | name = Release; 595 | }; 596 | /* End XCBuildConfiguration section */ 597 | 598 | /* Begin XCConfigurationList section */ 599 | 6AD3EDC42552A00800F8EF61 /* Build configuration list for PBXProject "CoordinatorPractice" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 6AD3EDF42552A00A00F8EF61 /* Debug */, 603 | 6AD3EDF52552A00A00F8EF61 /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | 6AD3EDF62552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPractice" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 6AD3EDF72552A00A00F8EF61 /* Debug */, 612 | 6AD3EDF82552A00A00F8EF61 /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | defaultConfigurationName = Release; 616 | }; 617 | 6AD3EDF92552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPracticeTests" */ = { 618 | isa = XCConfigurationList; 619 | buildConfigurations = ( 620 | 6AD3EDFA2552A00A00F8EF61 /* Debug */, 621 | 6AD3EDFB2552A00A00F8EF61 /* Release */, 622 | ); 623 | defaultConfigurationIsVisible = 0; 624 | defaultConfigurationName = Release; 625 | }; 626 | 6AD3EDFC2552A00A00F8EF61 /* Build configuration list for PBXNativeTarget "CoordinatorPracticeUITests" */ = { 627 | isa = XCConfigurationList; 628 | buildConfigurations = ( 629 | 6AD3EDFD2552A00A00F8EF61 /* Debug */, 630 | 6AD3EDFE2552A00A00F8EF61 /* Release */, 631 | ); 632 | defaultConfigurationIsVisible = 0; 633 | defaultConfigurationName = Release; 634 | }; 635 | /* End XCConfigurationList section */ 636 | 637 | /* Begin XCVersionGroup section */ 638 | 6AD3EDD52552A00800F8EF61 /* CoordinatorPractice.xcdatamodeld */ = { 639 | isa = XCVersionGroup; 640 | children = ( 641 | 6AD3EDD62552A00800F8EF61 /* CoordinatorPractice.xcdatamodel */, 642 | ); 643 | currentVersion = 6AD3EDD62552A00800F8EF61 /* CoordinatorPractice.xcdatamodel */; 644 | path = CoordinatorPractice.xcdatamodeld; 645 | sourceTree = ""; 646 | versionGroupType = wrapper.xcdatamodel; 647 | }; 648 | /* End XCVersionGroup section */ 649 | }; 650 | rootObject = 6AD3EDC12552A00800F8EF61 /* Project object */; 651 | } 652 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | import CoreData 10 | 11 | @main 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var coordinator: MainCoordinator? 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | 19 | // MainCoordinator로 첫 화면 시작 20 | let navController = UINavigationController() 21 | 22 | coordinator = MainCoordinator(navigationController: navController) 23 | coordinator?.start() 24 | 25 | window = UIWindow(frame: UIScreen.main.bounds) 26 | window?.rootViewController = navController 27 | window?.makeKeyAndVisible() 28 | 29 | return true 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Coordinator/BuyCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BuyCoordinator.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | class BuyCoordinator: Coordinator { 11 | 12 | var childCoordinators = [Coordinator]() 13 | weak var parentCoordinator: MainCoordinator? 14 | var navigationController: UINavigationController 15 | 16 | init(navigationController: UINavigationController) { 17 | self.navigationController = navigationController 18 | } 19 | 20 | func start() { 21 | let vc = BuyViewController.instantiate() 22 | vc.coordinator = self 23 | navigationController.pushViewController(vc, animated: true) 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Coordinator/Coordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Coordinator.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | protocol Coordinator: AnyObject { 11 | var childCoordinators: [Coordinator] { get set } 12 | var navigationController: UINavigationController { get set } 13 | 14 | func start() 15 | } 16 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Coordinator/MainCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainCoordinator.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | class MainCoordinator: NSObject, Coordinator { 11 | 12 | var childCoordinators = [Coordinator]() 13 | var navigationController: UINavigationController 14 | 15 | init(navigationController: UINavigationController) { 16 | self.navigationController = navigationController 17 | } 18 | 19 | func start() { 20 | let vc = ViewController.instantiate() 21 | vc.coordinator = self 22 | navigationController.delegate = self 23 | navigationController.pushViewController(vc, animated: false) 24 | } 25 | 26 | func buySubscription() { 27 | let child = BuyCoordinator(navigationController: navigationController) 28 | child.parentCoordinator = self 29 | childCoordinators.append(child) 30 | child.start() 31 | } 32 | 33 | func createAccount() { 34 | let vc = CreateAccountViewController.instantiate() 35 | vc.coordinator = self 36 | navigationController.pushViewController(vc, animated: true) 37 | } 38 | 39 | func childDidFinish(_ child: Coordinator?) { 40 | for (index, coordinator) in childCoordinators.enumerated() { 41 | if coordinator === child { 42 | childCoordinators.remove(at: index) 43 | break 44 | } 45 | } 46 | } 47 | 48 | } 49 | 50 | extension MainCoordinator: UINavigationControllerDelegate { 51 | func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) { 52 | 53 | guard let fromViewController = navigationController.transitionCoordinator?.viewController(forKey: .from) else { 54 | return 55 | } 56 | 57 | if navigationController.viewControllers.contains(fromViewController) { 58 | return 59 | } 60 | 61 | 62 | if let buyViewController = fromViewController as? BuyViewController { 63 | childDidFinish(buyViewController.coordinator) 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/CoordinatorPractice.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | CoordinatorPractice.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/CoordinatorPractice.xcdatamodeld/CoordinatorPractice.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSupportsIndirectInputEvents 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/Storyboarded.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Storyboarded.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | protocol Storyboarded { 11 | static func instantiate() -> Self 12 | } 13 | 14 | extension Storyboarded where Self: UIViewController { 15 | static func instantiate() -> Self { 16 | // ex) "CoordinatorPractice(프로젝트 이름).ViewController" 17 | let fullName = NSStringFromClass(self) 18 | 19 | // .을 기준으로 split해 "ViewController"만 추출 20 | let className = fullName.components(separatedBy: ".")[1] 21 | 22 | // Bundle.main에서 Main.storyboard 가져오기 23 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main) 24 | 25 | // storyboard에 className을 identifier로 가지고 있는 ViewController 인스턴스화 26 | return storyboard.instantiateViewController(withIdentifier: className) as! Self 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/ViewController/BuyViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BuyViewController.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | class BuyViewController: UIViewController, Storyboarded { 11 | 12 | weak var coordinator: BuyCoordinator? 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/ViewController/CreateAccountViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateAccountViewController.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | class CreateAccountViewController: UIViewController, Storyboarded { 11 | 12 | weak var coordinator: MainCoordinator? 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPractice/ViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CoordinatorPractice 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController, Storyboarded { 11 | 12 | weak var coordinator: MainCoordinator? 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | } 17 | 18 | @IBAction func buyTapped(_ sender: Any) { 19 | coordinator?.buySubscription() 20 | } 21 | 22 | @IBAction func createAccount(_ sender: Any) { 23 | coordinator?.createAccount() 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPracticeTests/CoordinatorPracticeTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoordinatorPracticeTests.swift 3 | // CoordinatorPracticeTests 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import XCTest 9 | @testable import CoordinatorPractice 10 | 11 | class CoordinatorPracticeTests: XCTestCase { 12 | 13 | override func setUpWithError() throws { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | } 16 | 17 | override func tearDownWithError() throws { 18 | // Put teardown code here. This method is called after the invocation of each test method in the class. 19 | } 20 | 21 | func testExample() throws { 22 | // This is an example of a functional test case. 23 | // Use XCTAssert and related functions to verify your tests produce the correct results. 24 | } 25 | 26 | func testPerformanceExample() throws { 27 | // This is an example of a performance test case. 28 | self.measure { 29 | // Put the code you want to measure the time of here. 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPracticeTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPracticeUITests/CoordinatorPracticeUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoordinatorPracticeUITests.swift 3 | // CoordinatorPracticeUITests 4 | // 5 | // Created by Keunna Lee on 2020/11/04. 6 | // 7 | 8 | import XCTest 9 | 10 | class CoordinatorPracticeUITests: XCTestCase { 11 | 12 | override func setUpWithError() throws { 13 | // Put setup code here. This method is called before the invocation of each test method in the class. 14 | 15 | // In UI tests it is usually best to stop immediately when a failure occurs. 16 | continueAfterFailure = false 17 | 18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 19 | } 20 | 21 | override func tearDownWithError() throws { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | func testExample() throws { 26 | // UI tests must launch the application that they test. 27 | let app = XCUIApplication() 28 | app.launch() 29 | 30 | // Use recording to get started writing UI tests. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | func testLaunchPerformance() throws { 35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { 36 | // This measures how long it takes to launch your application. 37 | measure(metrics: [XCTApplicationLaunchMetric()]) { 38 | XCUIApplication().launch() 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /CoordinatorPractice/CoordinatorPracticeUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Media/coordinator_basic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-Lena/Coordinator/275eaeb039950820e4385943ebc0e057c6d5f2ca/Media/coordinator_basic.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Coordinator 2 | 3 |
4 | 5 | [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdev-Lena%2FCoordinator&count_bg=%238588A2&title_bg=%237D3CCF&icon=&icon_color=%23E7E7E7&title=hits%E2%9C%A8&edge_flat=false)](https://hits.seeyoufarm.com) 6 | 7 | 8 | 👉🏻 [간단한 예제로 살펴보는 iOS Design/Architecture Pattern: Coordinator - Basic](https://lena-chamna.netlify.app/post/ios_design_pattern_coordinator_basic/) 9 | 10 | 11 | 👉🏻 [간단한 예제로 살펴보는 iOS Design/Architecture Pattern: Coordinator - Advanced](https://lena-chamna.netlify.app/post/ios_design_pattern_coordinator_advanced/) 12 | 13 | 14 | ## Coordinator란? 15 | 16 | *Soroush Khanlou*가 NSSpain conference 2015에서 iOS 커뮤니티에 소개한 패턴으로 [Soroush Khanlou](https://khanlou.com/2015/10/coordinators-redux/) 의 글에 보면 코디네이터(Coordinator)를 이렇게 소개하고 있습니다.
17 | 18 | > So what is a coordinator? ***A coordinator is an object that bosses one or more view controllers around.*** Taking all of the driving logic out of your view controllers, and moving that stuff one layer up is gonna make your life a lot more awesome. 19 | 20 | > 코디네이터란? ***코디네이터는 하나 이상의 뷰 컨트롤러에게 지시를 내리는 객체입니다***. 21 | > ... 이하 생략
22 | 23 | 24 | 25 | 여기서 말하는 지시는 화면 전환에 대한 지시를 말합니다. **Coordinator 패턴에서는 현재 View Controller에서 다음 View Controller로 이동할 때 직접 push / present 등의 화면 전환을 하는 대신 모든 화면 내비게이션을 코디네이터가 관리합니다.** 즉, View Controller에서 Navigation의 책임을 다른 클래스로 분리합니다. 따라서 View Controller들이 서로 분리될 수 있고 쉽게 재사용될 수 있습니다.
26 | 27 | ### Coordinator 특징
28 | 29 | - coordinator 별로 하나 또는 그 이상의 View Controller를 보유합니다. 30 | - 각 coordinator는 일반적으로 “**start**”라고 불리는 메서드를 사용하여 View Controller를 표시합니다. 31 | - 각 View Controller에는 coordinator에 대한 **delegate** reference가 있습니다. 32 | - 각 coordinator는 **child** coordinators 배열을 가지고 있습니다. 33 | - 각 child coordinator는 **parent** coordinator에 대한 delegate reference가 있습니다. 34 | 35 |
더 자세한 내용은 [블로그](https://lena-chamna.netlify.app/post/ios_design_pattern_coordinator_basic/)에 적어놨습니다. 36 | 37 |

38 | 39 | ### 예시 화면 40 | 41 | ![alt text](https://github.com/dev-Lena/Coordinator/blob/main/Media/coordinator_basic.gif) 42 | 43 | * 이 예제는 [How to use the coordinator pattern in iOS apps](https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps) 와 [Advanced coordinators in iOS](https://www.hackingwithswift.com/articles/175/advanced-coordinator-pattern-tutorial-ios)를 참고하여 만들었습니다. 44 | * ViewController의 UI는 Main.Storyboard에 구현했으며 storyboardId를 사용합니다. 45 | * Navigation Controller을 기반으로 화면을 전환합니다. 46 | * SceneDelegate를 삭제후 AppDelegate만을 사용합니다. 47 | (반드시 SceneDelegate를 삭제해야하는 것은 아닙니다. 이와 관련된 내용은 [이슈 Initial Setting #4](https://github.com/dev-Lena/Coordinator/issues/4)를 참고해주세요.) 48 | 49 | 50 |
51 | 하나의 Coordinator를 사용하는 방법은 Basic을, 여러 개의 Coordinator를 사용하는 방법은 Advanced를 확인해주세요. 52 | 53 |

54 | 55 | ### Coordinator - Basic 56 | 57 | image 58 | 59 | * 구현 과정은 [PR](https://github.com/dev-Lena/Coordinator/pull/2) 에 커밋으로 남겨놓았습니다. 60 | * Basic에서는 childCoordinators를 사용하지 않고 하나의 Coordinator를 사용합니다. 61 | 62 | 63 | 64 | 👉🏻 [간단한 예제로 살펴보는 iOS Design/Architecture Pattern: Coordinator - Basic](https://lena-chamna.netlify.app/post/ios_design_pattern_coordinator_basic/) 65 | 66 |
67 | 68 | ### Coordinator - Advanced 69 | 70 | image 71 | 72 | * 구현 과정은 [PR](https://github.com/dev-Lena/Coordinator/pull/7) 에 커밋으로 남겨놓았습니다. 73 | 74 | * Advanced에서는 두 개이상의 Coordinator를 사용하는 방법을 간단하게 소개합니다. Coordinator 객체 간 child와 parent 관계 정리하는 방법이 소개되어 있습니다. 75 | 76 | 77 | 78 | 👉🏻 [간단한 예제로 살펴보는 iOS Design/Architecture Pattern: Coordinator - Advanced](https://lena-chamna.netlify.app/post/ios_design_pattern_coordinator_advanced/) 79 | --------------------------------------------------------------------------------