diff --git a/Chapter1/BareBasic/BareBasic.xcodeproj/project.pbxproj b/Chapter1/BareBasic/BareBasic.xcodeproj/project.pbxproj index 5e4919c..03bbaea 100644 --- a/Chapter1/BareBasic/BareBasic.xcodeproj/project.pbxproj +++ b/Chapter1/BareBasic/BareBasic.xcodeproj/project.pbxproj @@ -7,25 +7,58 @@ objects = { /* Begin PBXBuildFile section */ - 2C7582891BE0A4B600BE59B3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C7582881BE0A4B600BE59B3 /* AppDelegate.swift */; }; - 2C75828B1BE0A4B600BE59B3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C75828A1BE0A4B600BE59B3 /* ViewController.swift */; }; - 2C75828E1BE0A4B600BE59B3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C75828C1BE0A4B600BE59B3 /* Main.storyboard */; }; - 2C7582901BE0A4B600BE59B3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C75828F1BE0A4B600BE59B3 /* Assets.xcassets */; }; - 2C7582931BE0A4B600BE59B3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C7582911BE0A4B600BE59B3 /* LaunchScreen.storyboard */; }; + 047F9B3D1F6961C600E637ED /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F9B3C1F6961C600E637ED /* AppDelegate.swift */; }; + 047F9B3F1F6961C600E637ED /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F9B3E1F6961C600E637ED /* ViewController.swift */; }; + 047F9B421F6961C600E637ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 047F9B401F6961C600E637ED /* Main.storyboard */; }; + 047F9B441F6961C600E637ED /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 047F9B431F6961C600E637ED /* Assets.xcassets */; }; + 047F9B471F6961C600E637ED /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 047F9B451F6961C600E637ED /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 047F9B4E1F6961C600E637ED /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 047F9B311F6961C600E637ED /* Project object */; + proxyType = 1; + remoteGlobalIDString = 047F9B381F6961C600E637ED; + remoteInfo = BareBasic; + }; + 047F9B591F6961C600E637ED /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 047F9B311F6961C600E637ED /* Project object */; + proxyType = 1; + remoteGlobalIDString = 047F9B381F6961C600E637ED; + remoteInfo = BareBasic; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 2C7582851BE0A4B600BE59B3 /* BareBasic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BareBasic.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C7582881BE0A4B600BE59B3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 2C75828A1BE0A4B600BE59B3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 2C75828D1BE0A4B600BE59B3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 2C75828F1BE0A4B600BE59B3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C7582921BE0A4B600BE59B3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 2C7582941BE0A4B600BE59B3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 047F9B391F6961C600E637ED /* BareBasic */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = BareBasic; path = "../../../../../../../../iOS-Swift-Basics_helloworld/Chapter1/BareBasic/BareBasic"; sourceTree = BUILT_PRODUCTS_DIR; }; + 047F9B3C1F6961C600E637ED /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 047F9B3E1F6961C600E637ED /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 047F9B411F6961C600E637ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 047F9B431F6961C600E637ED /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 047F9B461F6961C600E637ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 047F9B481F6961C600E637ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 047F9B4D1F6961C600E637ED /* BareBasicTests */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = BareBasicTests; path = "../../../../../../../../iOS-Swift-Basics_helloworld/Chapter1/BareBasic/BareBasicTests"; sourceTree = BUILT_PRODUCTS_DIR; }; + 047F9B581F6961C600E637ED /* BareBasicUITests */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = BareBasicUITests; path = "../../../../../../../../iOS-Swift-Basics_helloworld/Chapter1/BareBasic/BareBasicUITests"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2C7582821BE0A4B600BE59B3 /* Frameworks */ = { + 047F9B361F6961C600E637ED /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B4A1F6961C600E637ED /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B551F6961C600E637ED /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -35,31 +68,33 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2C75827C1BE0A4B600BE59B3 = { + 047F9B301F6961C600E637ED = { isa = PBXGroup; children = ( - 2C7582871BE0A4B600BE59B3 /* BareBasic */, - 2C7582861BE0A4B600BE59B3 /* Products */, + 047F9B3B1F6961C600E637ED /* BareBasic */, + 047F9B3A1F6961C600E637ED /* Products */, ); sourceTree = ""; }; - 2C7582861BE0A4B600BE59B3 /* Products */ = { + 047F9B3A1F6961C600E637ED /* Products */ = { isa = PBXGroup; children = ( - 2C7582851BE0A4B600BE59B3 /* BareBasic.app */, + 047F9B391F6961C600E637ED /* BareBasic */, + 047F9B4D1F6961C600E637ED /* BareBasicTests */, + 047F9B581F6961C600E637ED /* BareBasicUITests */, ); name = Products; sourceTree = ""; }; - 2C7582871BE0A4B600BE59B3 /* BareBasic */ = { + 047F9B3B1F6961C600E637ED /* BareBasic */ = { isa = PBXGroup; children = ( - 2C7582881BE0A4B600BE59B3 /* AppDelegate.swift */, - 2C75828A1BE0A4B600BE59B3 /* ViewController.swift */, - 2C75828C1BE0A4B600BE59B3 /* Main.storyboard */, - 2C75828F1BE0A4B600BE59B3 /* Assets.xcassets */, - 2C7582911BE0A4B600BE59B3 /* LaunchScreen.storyboard */, - 2C7582941BE0A4B600BE59B3 /* Info.plist */, + 047F9B3C1F6961C600E637ED /* AppDelegate.swift */, + 047F9B3E1F6961C600E637ED /* ViewController.swift */, + 047F9B401F6961C600E637ED /* Main.storyboard */, + 047F9B431F6961C600E637ED /* Assets.xcassets */, + 047F9B451F6961C600E637ED /* LaunchScreen.storyboard */, + 047F9B481F6961C600E637ED /* Info.plist */, ); path = BareBasic; sourceTree = ""; @@ -67,13 +102,13 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 2C7582841BE0A4B600BE59B3 /* BareBasic */ = { + 047F9B381F6961C600E637ED /* BareBasic */ = { isa = PBXNativeTarget; - buildConfigurationList = 2C7582971BE0A4B600BE59B3 /* Build configuration list for PBXNativeTarget "BareBasic" */; + buildConfigurationList = 047F9B611F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasic" */; buildPhases = ( - 2C7582811BE0A4B600BE59B3 /* Sources */, - 2C7582821BE0A4B600BE59B3 /* Frameworks */, - 2C7582831BE0A4B600BE59B3 /* Resources */, + 047F9B351F6961C600E637ED /* Sources */, + 047F9B361F6961C600E637ED /* Frameworks */, + 047F9B371F6961C600E637ED /* Resources */, ); buildRules = ( ); @@ -81,24 +116,72 @@ ); name = BareBasic; productName = BareBasic; - productReference = 2C7582851BE0A4B600BE59B3 /* BareBasic.app */; + productReference = 047F9B391F6961C600E637ED /* BareBasic */; productType = "com.apple.product-type.application"; }; + 047F9B4C1F6961C600E637ED /* BareBasicTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 047F9B641F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasicTests" */; + buildPhases = ( + 047F9B491F6961C600E637ED /* Sources */, + 047F9B4A1F6961C600E637ED /* Frameworks */, + 047F9B4B1F6961C600E637ED /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 047F9B4F1F6961C600E637ED /* PBXTargetDependency */, + ); + name = BareBasicTests; + productName = BareBasicTests; + productReference = 047F9B4D1F6961C600E637ED /* BareBasicTests */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 047F9B571F6961C600E637ED /* BareBasicUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 047F9B671F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasicUITests" */; + buildPhases = ( + 047F9B541F6961C600E637ED /* Sources */, + 047F9B551F6961C600E637ED /* Frameworks */, + 047F9B561F6961C600E637ED /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 047F9B5A1F6961C600E637ED /* PBXTargetDependency */, + ); + name = BareBasicUITests; + productName = BareBasicUITests; + productReference = 047F9B581F6961C600E637ED /* BareBasicUITests */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 2C75827D1BE0A4B600BE59B3 /* Project object */ = { + 047F9B311F6961C600E637ED /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = CodersHigh; + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = Mac; TargetAttributes = { - 2C7582841BE0A4B600BE59B3 = { - CreatedOnToolsVersion = 7.0.1; + 047F9B381F6961C600E637ED = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + 047F9B4C1F6961C600E637ED = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + TestTargetID = 047F9B381F6961C600E637ED; + }; + 047F9B571F6961C600E637ED = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + TestTargetID = 047F9B381F6961C600E637ED; }; }; }; - buildConfigurationList = 2C7582801BE0A4B600BE59B3 /* Build configuration list for PBXProject "BareBasic" */; + buildConfigurationList = 047F9B341F6961C600E637ED /* Build configuration list for PBXProject "BareBasic" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -106,54 +189,97 @@ en, Base, ); - mainGroup = 2C75827C1BE0A4B600BE59B3; - productRefGroup = 2C7582861BE0A4B600BE59B3 /* Products */; + mainGroup = 047F9B301F6961C600E637ED; + productRefGroup = 047F9B3A1F6961C600E637ED /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 2C7582841BE0A4B600BE59B3 /* BareBasic */, + 047F9B381F6961C600E637ED /* BareBasic */, + 047F9B4C1F6961C600E637ED /* BareBasicTests */, + 047F9B571F6961C600E637ED /* BareBasicUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 2C7582831BE0A4B600BE59B3 /* Resources */ = { + 047F9B371F6961C600E637ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 047F9B471F6961C600E637ED /* LaunchScreen.storyboard in Resources */, + 047F9B441F6961C600E637ED /* Assets.xcassets in Resources */, + 047F9B421F6961C600E637ED /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B4B1F6961C600E637ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B561F6961C600E637ED /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C7582931BE0A4B600BE59B3 /* LaunchScreen.storyboard in Resources */, - 2C7582901BE0A4B600BE59B3 /* Assets.xcassets in Resources */, - 2C75828E1BE0A4B600BE59B3 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 2C7582811BE0A4B600BE59B3 /* Sources */ = { + 047F9B351F6961C600E637ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 047F9B3F1F6961C600E637ED /* ViewController.swift in Sources */, + 047F9B3D1F6961C600E637ED /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B491F6961C600E637ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 047F9B541F6961C600E637ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C75828B1BE0A4B600BE59B3 /* ViewController.swift in Sources */, - 2C7582891BE0A4B600BE59B3 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 047F9B4F1F6961C600E637ED /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 047F9B381F6961C600E637ED /* BareBasic */; + targetProxy = 047F9B4E1F6961C600E637ED /* PBXContainerItemProxy */; + }; + 047F9B5A1F6961C600E637ED /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 047F9B381F6961C600E637ED /* BareBasic */; + targetProxy = 047F9B591F6961C600E637ED /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 2C75828C1BE0A4B600BE59B3 /* Main.storyboard */ = { + 047F9B401F6961C600E637ED /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C75828D1BE0A4B600BE59B3 /* Base */, + 047F9B411F6961C600E637ED /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 2C7582911BE0A4B600BE59B3 /* LaunchScreen.storyboard */ = { + 047F9B451F6961C600E637ED /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C7582921BE0A4B600BE59B3 /* Base */, + 047F9B461F6961C600E637ED /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -161,10 +287,12 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 2C7582951BE0A4B600BE59B3 /* Debug */ = { + 047F9B5F1F6961C600E637ED /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -172,10 +300,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -197,19 +328,22 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 2C7582961BE0A4B600BE59B3 /* Release */ = { + 047F9B601F6961C600E637ED /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -217,10 +351,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -236,57 +373,133 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 2C7582981BE0A4B600BE59B3 /* Debug */ = { + 047F9B621F6961C600E637ED /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = BareBasic/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.BareBasic; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasic; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; - 2C7582991BE0A4B600BE59B3 /* Release */ = { + 047F9B631F6961C600E637ED /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = BareBasic/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.BareBasic; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasic; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + 047F9B651F6961C600E637ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = BareBasicTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasicTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BareBasic.app/BareBasic"; + }; + name = Debug; + }; + 047F9B661F6961C600E637ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = BareBasicTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasicTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BareBasic.app/BareBasic"; + }; + name = Release; + }; + 047F9B681F6961C600E637ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = BareBasicUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasicUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = BareBasic; + }; + name = Debug; + }; + 047F9B691F6961C600E637ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = BareBasicUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = pakpam.BareBasicUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = BareBasic; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2C7582801BE0A4B600BE59B3 /* Build configuration list for PBXProject "BareBasic" */ = { + 047F9B341F6961C600E637ED /* Build configuration list for PBXProject "BareBasic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 047F9B5F1F6961C600E637ED /* Debug */, + 047F9B601F6961C600E637ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 047F9B611F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 047F9B621F6961C600E637ED /* Debug */, + 047F9B631F6961C600E637ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 047F9B641F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasicTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C7582951BE0A4B600BE59B3 /* Debug */, - 2C7582961BE0A4B600BE59B3 /* Release */, + 047F9B651F6961C600E637ED /* Debug */, + 047F9B661F6961C600E637ED /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2C7582971BE0A4B600BE59B3 /* Build configuration list for PBXNativeTarget "BareBasic" */ = { + 047F9B671F6961C600E637ED /* Build configuration list for PBXNativeTarget "BareBasicUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C7582981BE0A4B600BE59B3 /* Debug */, - 2C7582991BE0A4B600BE59B3 /* Release */, + 047F9B681F6961C600E637ED /* Debug */, + 047F9B691F6961C600E637ED /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 2C75827D1BE0A4B600BE59B3 /* Project object */; + rootObject = 047F9B311F6961C600E637ED /* Project object */; } diff --git a/Chapter1/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Chapter1/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a2f94f8 --- /dev/null +++ b/Chapter1/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Chapter1/BareBasic/BareBasic/AppDelegate.swift b/Chapter1/BareBasic/BareBasic/AppDelegate.swift index 7275f38..09b1f78 100644 --- a/Chapter1/BareBasic/BareBasic/AppDelegate.swift +++ b/Chapter1/BareBasic/BareBasic/AppDelegate.swift @@ -2,8 +2,8 @@ // AppDelegate.swift // BareBasic // -// Created by Lingostar on 2015. 10. 28.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Chapter1/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json b/Chapter1/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/Chapter1/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Chapter1/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Chapter1/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard b/Chapter1/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard index 2e721e1..fdf3f97 100644 --- a/Chapter1/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard +++ b/Chapter1/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -13,10 +14,9 @@ - + - - + diff --git a/Chapter1/BareBasic/BareBasic/Base.lproj/Main.storyboard b/Chapter1/BareBasic/BareBasic/Base.lproj/Main.storyboard index 090b02d..46ed535 100644 --- a/Chapter1/BareBasic/BareBasic/Base.lproj/Main.storyboard +++ b/Chapter1/BareBasic/BareBasic/Base.lproj/Main.storyboard @@ -1,7 +1,12 @@ - - + + + + + - + + + @@ -13,29 +18,30 @@ - + - - - - + + + + - - - + - + diff --git a/Chapter1/BareBasic/BareBasic/Info.plist b/Chapter1/BareBasic/BareBasic/Info.plist index 40c6215..d052473 100644 --- a/Chapter1/BareBasic/BareBasic/Info.plist +++ b/Chapter1/BareBasic/BareBasic/Info.plist @@ -16,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/Chapter1/BareBasic/BareBasic/ViewController.swift b/Chapter1/BareBasic/BareBasic/ViewController.swift index 236ec97..1cf3ba7 100644 --- a/Chapter1/BareBasic/BareBasic/ViewController.swift +++ b/Chapter1/BareBasic/BareBasic/ViewController.swift @@ -2,8 +2,8 @@ // ViewController.swift // BareBasic // -// Created by Lingostar on 2015. 10. 28.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit diff --git a/Chapter1/BareBasic/BareBasicTests/BareBasicTests.swift b/Chapter1/BareBasic/BareBasicTests/BareBasicTests.swift new file mode 100644 index 0000000..f8e001d --- /dev/null +++ b/Chapter1/BareBasic/BareBasicTests/BareBasicTests.swift @@ -0,0 +1,36 @@ +// +// BareBasicTests.swift +// BareBasicTests +// +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest +@testable import BareBasic + +class BareBasicTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Chapter1/BareBasic/BareBasicTests/Info.plist b/Chapter1/BareBasic/BareBasicTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Chapter1/BareBasic/BareBasicTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Chapter1/BareBasic/BareBasicUITests/BareBasicUITests.swift b/Chapter1/BareBasic/BareBasicUITests/BareBasicUITests.swift new file mode 100644 index 0000000..b5ba9b8 --- /dev/null +++ b/Chapter1/BareBasic/BareBasicUITests/BareBasicUITests.swift @@ -0,0 +1,36 @@ +// +// BareBasicUITests.swift +// BareBasicUITests +// +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest + +class BareBasicUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // 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. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/Chapter1/BareBasic/BareBasicUITests/Info.plist b/Chapter1/BareBasic/BareBasicUITests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Chapter1/BareBasic/BareBasicUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Chapter1/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Chapter1/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ca797d8 --- /dev/null +++ b/Chapter1/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Chapter1/HelloiPhone/HelloiPhoneTests/HelloiPhoneTests.swift b/Chapter1/HelloiPhone/HelloiPhoneTests/HelloiPhoneTests.swift new file mode 100644 index 0000000..2eb8cb0 --- /dev/null +++ b/Chapter1/HelloiPhone/HelloiPhoneTests/HelloiPhoneTests.swift @@ -0,0 +1,36 @@ +// +// HelloiPhoneTests.swift +// HelloiPhoneTests +// +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest +@testable import HelloiPhone + +class HelloiPhoneTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Chapter1/HelloiPhone/HelloiPhoneTests/Info.plist b/Chapter1/HelloiPhone/HelloiPhoneTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Chapter1/HelloiPhone/HelloiPhoneTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Chapter1/HelloiPhone/HelloiPhoneUITests/HelloiPhoneUITests.swift b/Chapter1/HelloiPhone/HelloiPhoneUITests/HelloiPhoneUITests.swift new file mode 100644 index 0000000..0b41d14 --- /dev/null +++ b/Chapter1/HelloiPhone/HelloiPhoneUITests/HelloiPhoneUITests.swift @@ -0,0 +1,36 @@ +// +// HelloiPhoneUITests.swift +// HelloiPhoneUITests +// +// Created by Mac on 2017. 9. 13.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest + +class HelloiPhoneUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // 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. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/Chapter1/HelloiPhone/HelloiPhoneUITests/Info.plist b/Chapter1/HelloiPhone/HelloiPhoneUITests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Chapter1/HelloiPhone/HelloiPhoneUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Chapter2/Session2.playground/Contents.swift b/Chapter2/Session2.playground/Contents.swift index daf3d6f..a1f114a 100644 --- a/Chapter2/Session2.playground/Contents.swift +++ b/Chapter2/Session2.playground/Contents.swift @@ -94,7 +94,7 @@ roomCapacity["Kahlo"] let roomNames = [String](roomCapacity.keys) let capacities = [Int](roomCapacity.values) -let total = capacities.reduce(0, combine: +) +let total = capacities.reduce(0, +) //: Session 2-6 컬렉션2 Set let subway2 :Set = ["시청", "을지로입구", "을지로3가", "을지로4가","동대문역사문화공원", "신당", "상왕십리", "왕십리", "한양대", "뚝섬", "성수", "건대입구", "구의", "강변", "잠실나루", "잠실", "신천", "종합운동장", "삼성", "선릉", "역삼", "강남", "교대", "서초", "방배", "사당", "낙성대", "서울대입구", "봉천", "신림", "신대방", "구로디지털단지", "대림", "신도림", "문래", "영등포구청", "당산", "합정", "홍대입구", "신촌", "이대", "아현", "충정로"] @@ -103,14 +103,14 @@ subway2.count let subway3 :Set = ["지축", "구파발", "연신내", "불광", "녹번", "홍제", "무악재", "독립문", "경복궁", "안국", "종로3가", "을지로3가", "충무로", "동대입구", "약수", "금호", "옥수", "압구정", "신사", "잠원", "고속터미널", "교대", "남부터미널", "양재", "매봉", "도곡", "대치", "학여울", "대청", "일원", "수서", "가락시장", "경찰병원", "오금"] subway3.count -let transfer = subway2.intersect(subway3) +let transfer = subway2.intersection(subway3) transfer.count -let notTransfer = subway2.subtract(subway3) +let notTransfer = subway2.subtracting(subway3) notTransfer.count let union = subway2.union(subway3) union.count -let exOR = subway2.exclusiveOr(subway3) +let exOR = subway2.symmetricDifference(subway3) exOR.count if transfer.count > 0 { @@ -206,7 +206,7 @@ func ratingRecord (history:[Double]) -> (average:Double, min:Double, max:Double) ratings = [3.5, 2.0, 4.5, 5.0] bookDescription = "\(title)" -if let theRatings = ratings , record = ratingRecord(theRatings) { +if let theRatings = ratings , let record = ratingRecord(history: theRatings) { bookDescription += " has \(theRatings.count) ratings, \r\n average is \(record.average), from \(record.min) to \(record.max)" } else { bookDescription += " has no ratings yet" @@ -438,7 +438,7 @@ _={ } func callTaskToBoss() -> Task? { - if let myBoss = boss, callTo = myBoss.phoneNumber { + if let myBoss = boss, let callTo = myBoss.phoneNumber { var callTask = Task(type: .Call, owner: self) return callTask } @@ -539,7 +539,7 @@ _={ } func callTaskToBoss() -> Task? { - if let myBoss = boss, callTo = myBoss.phoneNumber { + if let myBoss = boss, let callTo = myBoss.phoneNumber { var callTask = Task(type: .Call(number:callTo), owner: self) return callTask } diff --git a/Chapter2/Session2.playground/timeline.xctimeline b/Chapter2/Session2.playground/timeline.xctimeline index 2eeb328..bd188b8 100644 --- a/Chapter2/Session2.playground/timeline.xctimeline +++ b/Chapter2/Session2.playground/timeline.xctimeline @@ -3,39 +3,39 @@ version = "3.0"> diff --git a/Chapter5/SwiftFunctionType.playground/Contents.swift b/Chapter5/SwiftFunctionType.playground/Contents.swift index 9222f30..2356ef7 100644 --- a/Chapter5/SwiftFunctionType.playground/Contents.swift +++ b/Chapter5/SwiftFunctionType.playground/Contents.swift @@ -4,9 +4,9 @@ import UIKit //: Session 5-1 Function Types -/*func addVAT(source:Double) -> Double { +func addVAT(source:Double) -> Double { return source * 1.1 -}*/ +} func couponDiscount(source:Double) -> Double { return source * 0.9 diff --git a/Chapter5/SwiftFunctionType.playground/timeline.xctimeline b/Chapter5/SwiftFunctionType.playground/timeline.xctimeline index 6cdf29c..c72e1c5 100644 --- a/Chapter5/SwiftFunctionType.playground/timeline.xctimeline +++ b/Chapter5/SwiftFunctionType.playground/timeline.xctimeline @@ -3,12 +3,12 @@ version = "3.0"> diff --git a/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj b/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj index 59c41e5..8ad412c 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj +++ b/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj @@ -3,29 +3,68 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 48; objects = { /* Begin PBXBuildFile section */ - 2C6EF0961C2AB6D8002398BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6EF0951C2AB6D8002398BD /* AppDelegate.swift */; }; - 2C6EF0981C2AB6D8002398BD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6EF0971C2AB6D8002398BD /* ViewController.swift */; }; - 2C6EF09B1C2AB6D8002398BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C6EF0991C2AB6D8002398BD /* Main.storyboard */; }; - 2C6EF09D1C2AB6D8002398BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C6EF09C1C2AB6D8002398BD /* Assets.xcassets */; }; - 2C6EF0A01C2AB6D8002398BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C6EF09E1C2AB6D8002398BD /* LaunchScreen.storyboard */; }; + 04BDBD2E1F825DD9004CC97E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD2D1F825DD9004CC97E /* AppDelegate.swift */; }; + 04BDBD301F825DD9004CC97E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD2F1F825DD9004CC97E /* ViewController.swift */; }; + 04BDBD331F825DD9004CC97E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBD311F825DD9004CC97E /* Main.storyboard */; }; + 04BDBD351F825DD9004CC97E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBD341F825DD9004CC97E /* Assets.xcassets */; }; + 04BDBD381F825DD9004CC97E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBD361F825DD9004CC97E /* LaunchScreen.storyboard */; }; + 04BDBD431F825DD9004CC97E /* MeetingRoomsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD421F825DD9004CC97E /* MeetingRoomsTests.swift */; }; + 04BDBD4E1F825DD9004CC97E /* MeetingRoomsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD4D1F825DD9004CC97E /* MeetingRoomsUITests.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 04BDBD3F1F825DD9004CC97E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 04BDBD221F825DD9004CC97E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 04BDBD291F825DD9004CC97E; + remoteInfo = MeetingRooms; + }; + 04BDBD4A1F825DD9004CC97E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 04BDBD221F825DD9004CC97E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 04BDBD291F825DD9004CC97E; + remoteInfo = MeetingRooms; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 2C6EF0921C2AB6D7002398BD /* MeetingRooms.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetingRooms.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C6EF0951C2AB6D8002398BD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 2C6EF0971C2AB6D8002398BD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 2C6EF09A1C2AB6D8002398BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 2C6EF09C1C2AB6D8002398BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C6EF09F1C2AB6D8002398BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 2C6EF0A11C2AB6D8002398BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD2A1F825DD9004CC97E /* MeetingRooms.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetingRooms.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBD2D1F825DD9004CC97E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 04BDBD2F1F825DD9004CC97E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 04BDBD321F825DD9004CC97E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 04BDBD341F825DD9004CC97E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 04BDBD371F825DD9004CC97E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 04BDBD391F825DD9004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD3E1F825DD9004CC97E /* MeetingRoomsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeetingRoomsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBD421F825DD9004CC97E /* MeetingRoomsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRoomsTests.swift; sourceTree = ""; }; + 04BDBD441F825DD9004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD491F825DD9004CC97E /* MeetingRoomsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeetingRoomsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBD4D1F825DD9004CC97E /* MeetingRoomsUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRoomsUITests.swift; sourceTree = ""; }; + 04BDBD4F1F825DD9004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2C6EF08F1C2AB6D7002398BD /* Frameworks */ = { + 04BDBD271F825DD9004CC97E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD3B1F825DD9004CC97E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD461F825DD9004CC97E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -35,45 +74,67 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2C6EF0891C2AB6D7002398BD = { + 04BDBD211F825DD9004CC97E = { isa = PBXGroup; children = ( - 2C6EF0941C2AB6D7002398BD /* MeetingRooms */, - 2C6EF0931C2AB6D7002398BD /* Products */, + 04BDBD2C1F825DD9004CC97E /* MeetingRooms */, + 04BDBD411F825DD9004CC97E /* MeetingRoomsTests */, + 04BDBD4C1F825DD9004CC97E /* MeetingRoomsUITests */, + 04BDBD2B1F825DD9004CC97E /* Products */, ); sourceTree = ""; }; - 2C6EF0931C2AB6D7002398BD /* Products */ = { + 04BDBD2B1F825DD9004CC97E /* Products */ = { isa = PBXGroup; children = ( - 2C6EF0921C2AB6D7002398BD /* MeetingRooms.app */, + 04BDBD2A1F825DD9004CC97E /* MeetingRooms.app */, + 04BDBD3E1F825DD9004CC97E /* MeetingRoomsTests.xctest */, + 04BDBD491F825DD9004CC97E /* MeetingRoomsUITests.xctest */, ); name = Products; sourceTree = ""; }; - 2C6EF0941C2AB6D7002398BD /* MeetingRooms */ = { + 04BDBD2C1F825DD9004CC97E /* MeetingRooms */ = { isa = PBXGroup; children = ( - 2C6EF0951C2AB6D8002398BD /* AppDelegate.swift */, - 2C6EF0971C2AB6D8002398BD /* ViewController.swift */, - 2C6EF0991C2AB6D8002398BD /* Main.storyboard */, - 2C6EF09C1C2AB6D8002398BD /* Assets.xcassets */, - 2C6EF09E1C2AB6D8002398BD /* LaunchScreen.storyboard */, - 2C6EF0A11C2AB6D8002398BD /* Info.plist */, + 04BDBD2D1F825DD9004CC97E /* AppDelegate.swift */, + 04BDBD2F1F825DD9004CC97E /* ViewController.swift */, + 04BDBD311F825DD9004CC97E /* Main.storyboard */, + 04BDBD341F825DD9004CC97E /* Assets.xcassets */, + 04BDBD361F825DD9004CC97E /* LaunchScreen.storyboard */, + 04BDBD391F825DD9004CC97E /* Info.plist */, ); path = MeetingRooms; sourceTree = ""; }; + 04BDBD411F825DD9004CC97E /* MeetingRoomsTests */ = { + isa = PBXGroup; + children = ( + 04BDBD421F825DD9004CC97E /* MeetingRoomsTests.swift */, + 04BDBD441F825DD9004CC97E /* Info.plist */, + ); + path = MeetingRoomsTests; + sourceTree = ""; + }; + 04BDBD4C1F825DD9004CC97E /* MeetingRoomsUITests */ = { + isa = PBXGroup; + children = ( + 04BDBD4D1F825DD9004CC97E /* MeetingRoomsUITests.swift */, + 04BDBD4F1F825DD9004CC97E /* Info.plist */, + ); + path = MeetingRoomsUITests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 2C6EF0911C2AB6D7002398BD /* MeetingRooms */ = { + 04BDBD291F825DD9004CC97E /* MeetingRooms */ = { isa = PBXNativeTarget; - buildConfigurationList = 2C6EF0A41C2AB6D8002398BD /* Build configuration list for PBXNativeTarget "MeetingRooms" */; + buildConfigurationList = 04BDBD521F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRooms" */; buildPhases = ( - 2C6EF08E1C2AB6D7002398BD /* Sources */, - 2C6EF08F1C2AB6D7002398BD /* Frameworks */, - 2C6EF0901C2AB6D7002398BD /* Resources */, + 04BDBD261F825DD9004CC97E /* Sources */, + 04BDBD271F825DD9004CC97E /* Frameworks */, + 04BDBD281F825DD9004CC97E /* Resources */, ); buildRules = ( ); @@ -81,80 +142,172 @@ ); name = MeetingRooms; productName = MeetingRooms; - productReference = 2C6EF0921C2AB6D7002398BD /* MeetingRooms.app */; + productReference = 04BDBD2A1F825DD9004CC97E /* MeetingRooms.app */; productType = "com.apple.product-type.application"; }; + 04BDBD3D1F825DD9004CC97E /* MeetingRoomsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 04BDBD551F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRoomsTests" */; + buildPhases = ( + 04BDBD3A1F825DD9004CC97E /* Sources */, + 04BDBD3B1F825DD9004CC97E /* Frameworks */, + 04BDBD3C1F825DD9004CC97E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 04BDBD401F825DD9004CC97E /* PBXTargetDependency */, + ); + name = MeetingRoomsTests; + productName = MeetingRoomsTests; + productReference = 04BDBD3E1F825DD9004CC97E /* MeetingRoomsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 04BDBD481F825DD9004CC97E /* MeetingRoomsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 04BDBD581F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRoomsUITests" */; + buildPhases = ( + 04BDBD451F825DD9004CC97E /* Sources */, + 04BDBD461F825DD9004CC97E /* Frameworks */, + 04BDBD471F825DD9004CC97E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 04BDBD4B1F825DD9004CC97E /* PBXTargetDependency */, + ); + name = MeetingRoomsUITests; + productName = MeetingRoomsUITests; + productReference = 04BDBD491F825DD9004CC97E /* MeetingRoomsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 2C6EF08A1C2AB6D7002398BD /* Project object */ = { + 04BDBD221F825DD9004CC97E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = CodersHigh; + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = Mac; TargetAttributes = { - 2C6EF0911C2AB6D7002398BD = { - CreatedOnToolsVersion = 7.1; + 04BDBD291F825DD9004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; + 04BDBD3D1F825DD9004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 04BDBD291F825DD9004CC97E; + }; + 04BDBD481F825DD9004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 04BDBD291F825DD9004CC97E; }; }; }; - buildConfigurationList = 2C6EF08D1C2AB6D7002398BD /* Build configuration list for PBXProject "MeetingRooms" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + buildConfigurationList = 04BDBD251F825DD9004CC97E /* Build configuration list for PBXProject "MeetingRooms" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); - mainGroup = 2C6EF0891C2AB6D7002398BD; - productRefGroup = 2C6EF0931C2AB6D7002398BD /* Products */; + mainGroup = 04BDBD211F825DD9004CC97E; + productRefGroup = 04BDBD2B1F825DD9004CC97E /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 2C6EF0911C2AB6D7002398BD /* MeetingRooms */, + 04BDBD291F825DD9004CC97E /* MeetingRooms */, + 04BDBD3D1F825DD9004CC97E /* MeetingRoomsTests */, + 04BDBD481F825DD9004CC97E /* MeetingRoomsUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 2C6EF0901C2AB6D7002398BD /* Resources */ = { + 04BDBD281F825DD9004CC97E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBD381F825DD9004CC97E /* LaunchScreen.storyboard in Resources */, + 04BDBD351F825DD9004CC97E /* Assets.xcassets in Resources */, + 04BDBD331F825DD9004CC97E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD3C1F825DD9004CC97E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD471F825DD9004CC97E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C6EF0A01C2AB6D8002398BD /* LaunchScreen.storyboard in Resources */, - 2C6EF09D1C2AB6D8002398BD /* Assets.xcassets in Resources */, - 2C6EF09B1C2AB6D8002398BD /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 2C6EF08E1C2AB6D7002398BD /* Sources */ = { + 04BDBD261F825DD9004CC97E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C6EF0981C2AB6D8002398BD /* ViewController.swift in Sources */, - 2C6EF0961C2AB6D8002398BD /* AppDelegate.swift in Sources */, + 04BDBD301F825DD9004CC97E /* ViewController.swift in Sources */, + 04BDBD2E1F825DD9004CC97E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD3A1F825DD9004CC97E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBD431F825DD9004CC97E /* MeetingRoomsTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD451F825DD9004CC97E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBD4E1F825DD9004CC97E /* MeetingRoomsUITests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 04BDBD401F825DD9004CC97E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 04BDBD291F825DD9004CC97E /* MeetingRooms */; + targetProxy = 04BDBD3F1F825DD9004CC97E /* PBXContainerItemProxy */; + }; + 04BDBD4B1F825DD9004CC97E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 04BDBD291F825DD9004CC97E /* MeetingRooms */; + targetProxy = 04BDBD4A1F825DD9004CC97E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 2C6EF0991C2AB6D8002398BD /* Main.storyboard */ = { + 04BDBD311F825DD9004CC97E /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C6EF09A1C2AB6D8002398BD /* Base */, + 04BDBD321F825DD9004CC97E /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 2C6EF09E1C2AB6D8002398BD /* LaunchScreen.storyboard */ = { + 04BDBD361F825DD9004CC97E /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C6EF09F1C2AB6D8002398BD /* Base */, + 04BDBD371F825DD9004CC97E /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -162,29 +315,41 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 2C6EF0A21C2AB6D8002398BD /* Debug */ = { + 04BDBD501F825DD9004CC97E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -198,38 +363,50 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 2C6EF0A31C2AB6D8002398BD /* Release */ = { + 04BDBD511F825DD9004CC97E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -237,57 +414,144 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 2C6EF0A51C2AB6D8002398BD /* Debug */ = { + 04BDBD531F825DD9004CC97E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = MeetingRooms/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRooms; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRooms; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 2C6EF0A61C2AB6D8002398BD /* Release */ = { + 04BDBD541F825DD9004CC97E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = MeetingRooms/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRooms; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRooms; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 04BDBD561F825DD9004CC97E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRoomsTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRoomsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MeetingRooms.app/MeetingRooms"; + }; + name = Debug; + }; + 04BDBD571F825DD9004CC97E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRoomsTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRoomsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MeetingRooms.app/MeetingRooms"; + }; + name = Release; + }; + 04BDBD591F825DD9004CC97E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRoomsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRoomsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeetingRooms; + }; + name = Debug; + }; + 04BDBD5A1F825DD9004CC97E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRoomsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MeetingRoomsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeetingRooms; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2C6EF08D1C2AB6D7002398BD /* Build configuration list for PBXProject "MeetingRooms" */ = { + 04BDBD251F825DD9004CC97E /* Build configuration list for PBXProject "MeetingRooms" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 04BDBD501F825DD9004CC97E /* Debug */, + 04BDBD511F825DD9004CC97E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 04BDBD521F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRooms" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C6EF0A21C2AB6D8002398BD /* Debug */, - 2C6EF0A31C2AB6D8002398BD /* Release */, + 04BDBD531F825DD9004CC97E /* Debug */, + 04BDBD541F825DD9004CC97E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2C6EF0A41C2AB6D8002398BD /* Build configuration list for PBXNativeTarget "MeetingRooms" */ = { + 04BDBD551F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRoomsTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C6EF0A51C2AB6D8002398BD /* Debug */, - 2C6EF0A61C2AB6D8002398BD /* Release */, + 04BDBD561F825DD9004CC97E /* Debug */, + 04BDBD571F825DD9004CC97E /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 04BDBD581F825DD9004CC97E /* Build configuration list for PBXNativeTarget "MeetingRoomsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 04BDBD591F825DD9004CC97E /* Debug */, + 04BDBD5A1F825DD9004CC97E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 2C6EF08A1C2AB6D7002398BD /* Project object */; + rootObject = 04BDBD221F825DD9004CC97E /* Project object */; } diff --git a/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ff41f19 --- /dev/null +++ b/SampleCodes/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SampleCodes/MeetingRooms/MeetingRooms/AppDelegate.swift b/SampleCodes/MeetingRooms/MeetingRooms/AppDelegate.swift index 22c3a0d..ff8f02d 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/AppDelegate.swift +++ b/SampleCodes/MeetingRooms/MeetingRooms/AppDelegate.swift @@ -2,8 +2,8 @@ // AppDelegate.swift // MeetingRooms // -// Created by Lingostar on 2015. 12. 23.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg b/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg deleted file mode 100644 index 829e21b..0000000 Binary files a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg and /dev/null differ diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json b/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json deleted file mode 100644 index b0283d5..0000000 --- a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "4347286612_11577182f1_o.jpg", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json b/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..1d060ed 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard b/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard index 2e721e1..f83f6fd 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard +++ b/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard @@ -1,22 +1,20 @@ - + - + + + - - - - - + - - + + diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard b/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard index eae1517..5cdbda7 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard +++ b/SampleCodes/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard @@ -1,267 +1,236 @@ - - + + + + + - - + + - + - - - + + + - - - + + - - - + - - + + - - - + - + - - + + - - + + - - - - - + + - - + + - - - - - + + - - + + - - - - - + + - - + + - - - - + - - + + - - + + - - - - - + + - - + + - - - - - + + - - + + - - - - - + + - - - - + - + diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Info.plist b/SampleCodes/MeetingRooms/MeetingRooms/Info.plist index 40c6215..16be3b6 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/Info.plist +++ b/SampleCodes/MeetingRooms/MeetingRooms/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -16,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/SampleCodes/MeetingRooms/MeetingRooms/ViewController.swift b/SampleCodes/MeetingRooms/MeetingRooms/ViewController.swift index 435714c..08ac764 100644 --- a/SampleCodes/MeetingRooms/MeetingRooms/ViewController.swift +++ b/SampleCodes/MeetingRooms/MeetingRooms/ViewController.swift @@ -2,8 +2,8 @@ // ViewController.swift // MeetingRooms // -// Created by Lingostar on 2015. 12. 23.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit diff --git a/SampleCodes/MeetingRooms/MeetingRoomsTests/Info.plist b/SampleCodes/MeetingRooms/MeetingRoomsTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MeetingRooms/MeetingRoomsTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MeetingRooms/MeetingRoomsTests/MeetingRoomsTests.swift b/SampleCodes/MeetingRooms/MeetingRoomsTests/MeetingRoomsTests.swift new file mode 100644 index 0000000..856faed --- /dev/null +++ b/SampleCodes/MeetingRooms/MeetingRoomsTests/MeetingRoomsTests.swift @@ -0,0 +1,36 @@ +// +// MeetingRoomsTests.swift +// MeetingRoomsTests +// +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest +@testable import MeetingRooms + +class MeetingRoomsTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/SampleCodes/MeetingRooms/MeetingRoomsUITests/Info.plist b/SampleCodes/MeetingRooms/MeetingRoomsUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MeetingRooms/MeetingRoomsUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MeetingRooms/MeetingRoomsUITests/MeetingRoomsUITests.swift b/SampleCodes/MeetingRooms/MeetingRoomsUITests/MeetingRoomsUITests.swift new file mode 100644 index 0000000..3963da3 --- /dev/null +++ b/SampleCodes/MeetingRooms/MeetingRoomsUITests/MeetingRoomsUITests.swift @@ -0,0 +1,36 @@ +// +// MeetingRoomsUITests.swift +// MeetingRoomsUITests +// +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest + +class MeetingRoomsUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // 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. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj deleted file mode 100644 index cd8935e..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj +++ /dev/null @@ -1,330 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 2C1A2E7B1CC7603D0069EEED /* TintColorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C1A2E7A1CC7603D0069EEED /* TintColorViewController.swift */; }; - 2C5B2DA81CC71E8D007D75DD /* EquipmentsDefault.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2C5B2DA71CC71E8D007D75DD /* EquipmentsDefault.plist */; }; - 2C5B2DAA1CC726B8007D75DD /* EquipmentsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C5B2DA91CC726B8007D75DD /* EquipmentsListViewController.swift */; }; - 2C6F67101CC233F5007EAEC7 /* RoomInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6F670F1CC233F5007EAEC7 /* RoomInfoViewController.swift */; }; - 2C6F67121CC342F3007EAEC7 /* ReservationListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6F67111CC342F3007EAEC7 /* ReservationListViewController.swift */; }; - 2C6F67141CC34BDF007EAEC7 /* ReserveRoomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6F67131CC34BDF007EAEC7 /* ReserveRoomViewController.swift */; }; - 2C9C276A1C958848002525E4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9C27691C958848002525E4 /* AppDelegate.swift */; }; - 2C9C276F1C958848002525E4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C9C276D1C958848002525E4 /* Main.storyboard */; }; - 2C9C27711C958849002525E4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C9C27701C958849002525E4 /* Assets.xcassets */; }; - 2C9C27741C958849002525E4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C9C27721C958849002525E4 /* LaunchScreen.storyboard */; }; - 2C9C277C1C9588BE002525E4 /* MeetingRoomsListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9C277B1C9588BE002525E4 /* MeetingRoomsListController.swift */; }; - 2CAA1EF41CB3F36D0096F3FA /* DataCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAA1EF31CB3F36D0096F3FA /* DataCenter.swift */; }; - 2CAA1EF61CB3FA630096F3FA /* BranchListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAA1EF51CB3FA630096F3FA /* BranchListViewController.swift */; }; - 2CAA1EF81CB3FA7C0096F3FA /* ServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAA1EF71CB3FA7C0096F3FA /* ServiceListViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2C1A2E7A1CC7603D0069EEED /* TintColorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TintColorViewController.swift; sourceTree = ""; }; - 2C5B2DA71CC71E8D007D75DD /* EquipmentsDefault.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = EquipmentsDefault.plist; sourceTree = ""; }; - 2C5B2DA91CC726B8007D75DD /* EquipmentsListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EquipmentsListViewController.swift; sourceTree = ""; }; - 2C6F670F1CC233F5007EAEC7 /* RoomInfoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomInfoViewController.swift; sourceTree = ""; }; - 2C6F67111CC342F3007EAEC7 /* ReservationListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReservationListViewController.swift; sourceTree = ""; }; - 2C6F67131CC34BDF007EAEC7 /* ReserveRoomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReserveRoomViewController.swift; sourceTree = ""; }; - 2C9C27661C958847002525E4 /* MeetingRoomsDynamic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetingRoomsDynamic.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C9C27691C958848002525E4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 2C9C276E1C958848002525E4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 2C9C27701C958849002525E4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C9C27731C958849002525E4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 2C9C27751C958849002525E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2C9C277B1C9588BE002525E4 /* MeetingRoomsListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingRoomsListController.swift; sourceTree = ""; }; - 2CAA1EF31CB3F36D0096F3FA /* DataCenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataCenter.swift; sourceTree = ""; }; - 2CAA1EF51CB3FA630096F3FA /* BranchListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BranchListViewController.swift; sourceTree = ""; }; - 2CAA1EF71CB3FA7C0096F3FA /* ServiceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServiceListViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2C9C27631C958847002525E4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2C9C275D1C958847002525E4 = { - isa = PBXGroup; - children = ( - 2C9C27681C958847002525E4 /* MeetingRoomsDynamic */, - 2C9C27671C958847002525E4 /* Products */, - ); - sourceTree = ""; - }; - 2C9C27671C958847002525E4 /* Products */ = { - isa = PBXGroup; - children = ( - 2C9C27661C958847002525E4 /* MeetingRoomsDynamic.app */, - ); - name = Products; - sourceTree = ""; - }; - 2C9C27681C958847002525E4 /* MeetingRoomsDynamic */ = { - isa = PBXGroup; - children = ( - 2C9C27691C958848002525E4 /* AppDelegate.swift */, - 2CAA1EF51CB3FA630096F3FA /* BranchListViewController.swift */, - 2CAA1EF71CB3FA7C0096F3FA /* ServiceListViewController.swift */, - 2C9C277B1C9588BE002525E4 /* MeetingRoomsListController.swift */, - 2CAA1EF31CB3F36D0096F3FA /* DataCenter.swift */, - 2C6F670F1CC233F5007EAEC7 /* RoomInfoViewController.swift */, - 2C6F67111CC342F3007EAEC7 /* ReservationListViewController.swift */, - 2C6F67131CC34BDF007EAEC7 /* ReserveRoomViewController.swift */, - 2C9C276D1C958848002525E4 /* Main.storyboard */, - 2C1A2E7A1CC7603D0069EEED /* TintColorViewController.swift */, - 2C5B2DA91CC726B8007D75DD /* EquipmentsListViewController.swift */, - 2C9C27701C958849002525E4 /* Assets.xcassets */, - 2C9C27721C958849002525E4 /* LaunchScreen.storyboard */, - 2C5B2DA71CC71E8D007D75DD /* EquipmentsDefault.plist */, - 2C9C27751C958849002525E4 /* Info.plist */, - ); - path = MeetingRoomsDynamic; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2C9C27651C958847002525E4 /* MeetingRoomsDynamic */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2C9C27781C958849002525E4 /* Build configuration list for PBXNativeTarget "MeetingRoomsDynamic" */; - buildPhases = ( - 2C9C27621C958847002525E4 /* Sources */, - 2C9C27631C958847002525E4 /* Frameworks */, - 2C9C27641C958847002525E4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MeetingRoomsDynamic; - productName = MeetingRoomsDynamic; - productReference = 2C9C27661C958847002525E4 /* MeetingRoomsDynamic.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2C9C275E1C958847002525E4 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = CodersHigh; - TargetAttributes = { - 2C9C27651C958847002525E4 = { - CreatedOnToolsVersion = 7.1; - }; - }; - }; - buildConfigurationList = 2C9C27611C958847002525E4 /* Build configuration list for PBXProject "MeetingRoomsDynamic" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2C9C275D1C958847002525E4; - productRefGroup = 2C9C27671C958847002525E4 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2C9C27651C958847002525E4 /* MeetingRoomsDynamic */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 2C9C27641C958847002525E4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C5B2DA81CC71E8D007D75DD /* EquipmentsDefault.plist in Resources */, - 2C9C27741C958849002525E4 /* LaunchScreen.storyboard in Resources */, - 2C9C27711C958849002525E4 /* Assets.xcassets in Resources */, - 2C9C276F1C958848002525E4 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2C9C27621C958847002525E4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2CAA1EF81CB3FA7C0096F3FA /* ServiceListViewController.swift in Sources */, - 2C6F67121CC342F3007EAEC7 /* ReservationListViewController.swift in Sources */, - 2C5B2DAA1CC726B8007D75DD /* EquipmentsListViewController.swift in Sources */, - 2C6F67141CC34BDF007EAEC7 /* ReserveRoomViewController.swift in Sources */, - 2CAA1EF41CB3F36D0096F3FA /* DataCenter.swift in Sources */, - 2C9C277C1C9588BE002525E4 /* MeetingRoomsListController.swift in Sources */, - 2CAA1EF61CB3FA630096F3FA /* BranchListViewController.swift in Sources */, - 2C9C276A1C958848002525E4 /* AppDelegate.swift in Sources */, - 2C6F67101CC233F5007EAEC7 /* RoomInfoViewController.swift in Sources */, - 2C1A2E7B1CC7603D0069EEED /* TintColorViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 2C9C276D1C958848002525E4 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 2C9C276E1C958848002525E4 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 2C9C27721C958849002525E4 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 2C9C27731C958849002525E4 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 2C9C27761C958849002525E4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 2C9C27771C958849002525E4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2C9C27791C958849002525E4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = MeetingRoomsDynamic/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRoomsDynamic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 2C9C277A1C958849002525E4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = MeetingRoomsDynamic/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRoomsDynamic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2C9C27611C958847002525E4 /* Build configuration list for PBXProject "MeetingRoomsDynamic" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C9C27761C958849002525E4 /* Debug */, - 2C9C27771C958849002525E4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2C9C27781C958849002525E4 /* Build configuration list for PBXNativeTarget "MeetingRoomsDynamic" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C9C27791C958849002525E4 /* Debug */, - 2C9C277A1C958849002525E4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2C9C275E1C958847002525E4 /* Project object */; -} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift deleted file mode 100644 index 2aaf60e..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// BranchListViewController.swift -// MeetingRoomsDynamic -// -// Created by Lingostar on 2016. 4. 5.. -// Copyright © 2016년 CodersHigh. All rights reserved. -// - -import UIKit - -class BranchListViewController: UITableViewController { - - override func viewDidLoad() { - self.title = "지점" - } - - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { - - return 1 - } - - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - - let rowCount = dataCenter.branches.count - return rowCount - } - - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("BranchCell", forIndexPath: indexPath) - - let branch = dataCenter.branches[indexPath.row] - cell.textLabel?.text = branch.name - return cell - } - - - /* - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - if segue.identifier == "ServiceSegue" { - if let destination = segue.destinationViewController as? ServiceListViewController { - if let selectedIndex = self.tableView.indexPathForSelectedRow?.row { - destination.branch = dataCenter.branches[selectedIndex] as Branch - } - - } - } - } - */ - - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - if segue.identifier == "ServiceSegue" { - guard let destination = segue.destinationViewController as? ServiceListViewController, selectedIndex = self.tableView.indexPathForSelectedRow?.row else { - return - } - destination.branch = dataCenter.branches[selectedIndex] as Branch - } - } - @IBAction func locationTurnOn(sender: AnyObject) { - - let locationAlert = UIAlertController(title: "위치 정보 요청", message: "위치 정보를 기반으로 가까운 지점을 자동으로 선택할 수 있습니다. 또는 지도앱에서 지점의 위치 정보를 제공해 드립니다. 선택하신 기능이 계속 제공됩니다. 환경설정에서 제공되는 기능을 변경할 수 있습니다.", preferredStyle: .ActionSheet) - let locationAction = UIAlertAction(title: "위치정보 켜기", style: .Default, handler: { (action:UIAlertAction) -> Void in - print ("위치정보 켜기 선택") - }) - let openMapAction = UIAlertAction(title: "지도앱에서 열기", style: .Default, handler: { (action:UIAlertAction) -> Void in - print ("지도앱에서 열기 선택") - }) - - locationAlert.addAction(locationAction) - locationAlert.addAction(openMapAction) - self.presentViewController(locationAlert, animated: true, completion: nil) - } -} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift deleted file mode 100644 index 2fda216..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// MeetingRoomsListController.swift -// MeetingRoomsDynamic -// -// Created by Lingostar on 2016. 3. 13.. -// Copyright © 2016년 CodersHigh. All rights reserved. -// - -import UIKit - -/* -class MeetingRoomsListController: UITableViewController { - - //var meetingRooms:[String:Int] = ["Banksy":4, "Rivera":8, "Kahlo":8, "Picasso":10, "Cezanne":20, "Matisse":30, "Renoir":40] - var meetingRooms:[String:[String:Int]] = ["Meeting":["Banksy":4, "Rivera":8, "Kahlo":8, "Picasso":10], "Seminar":["Cezanne":20, "Matisse":30, "Renoir":40]] - - func meetingRoomsAtIndex(index:Int) -> (key:String, value:[String:Int]) { - let orderedMeetingRooms = meetingRooms.sort({$0.1.first!.1 < $1.1.first!.1}) - return orderedMeetingRooms[index] - } - //Generic - - - override func viewDidLoad() { - super.viewDidLoad() - - // Uncomment the following line to preserve selection between presentations - // self.clearsSelectionOnViewWillAppear = false - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() - - - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - // MARK: - Table view data source - - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { - // #warning Incomplete implementation, return the number of sections - return meetingRooms.count - } - - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - // #warning Incomplete implementation, return the number of rows - //let categoryValues = Array(meetingRooms.values)[section] - - //let orderedMeetingRooms = meetingRooms.sort({$0.1.first!.1 < $1.1.first!.1}) - - //let rowCount = orderedMeetingRooms[section].1.count - let rowCount = meetingRoomsAtIndex(section).value.count - return rowCount - } - - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath) - - //let orderedMeetingRooms = meetingRooms.sort({$0.1.first!.1 < $1.1.first!.1}) - //let categoryValue = orderedMeetingRooms[indexPath.section].1 - let categoryValue = meetingRoomsAtIndex(indexPath.section).value - - let orderedCategoryValues = categoryValue.sort({$0.1 < $1.1}) - let roomName = orderedCategoryValues[indexPath.row].0 - let capacity = orderedCategoryValues[indexPath.row].1 - - cell.textLabel!.text = roomName - cell.detailTextLabel!.text = "\(capacity)" - - return cell - } - - - override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - - return Array(meetingRooms.keys)[section] - } - - override func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? { - - let rowCount = Array(meetingRooms.values)[section].count - - return "\(rowCount) rooms" - } - - /* - // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return false if you do not want the specified item to be editable. - return true - } - */ - - /* - // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { - // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } - } - */ - - /* - // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { - - } - */ - - /* - // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return false if you do not want the item to be re-orderable. - return true - } - */ - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. - } - */ - -} - - */ - - -class MeetingRoomsListController: UITableViewController { - var service:Service? - - override func viewDidLoad() { - self.title = service?.name - } - - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { - - return 1 - } - - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - guard let rowCount = service?.item?.count else { - return 0 - } - return rowCount - } - - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("ItemCell", forIndexPath: indexPath) - - guard let meetingRoom = service?.item?[indexPath.row] else { - return cell - } - cell.textLabel?.text = meetingRoom.name - cell.detailTextLabel?.text = String(meetingRoom.capacity) - return cell - } - - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - if segue.identifier == "ReservationSegue" { - guard let destination = segue.destinationViewController as? ReservationListViewController, selectedIndex = self.tableView.indexPathForSelectedRow?.row , meetingRoom = service?.item?[selectedIndex] else { - return - } - destination.meetingRoom = meetingRoom - } - } -} - - diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift deleted file mode 100644 index 49483ea..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift +++ /dev/null @@ -1,162 +0,0 @@ -// -// ReserveRoomViewController.swift -// MeetingRoomsDynamic -// -// Created by Lingostar on 2016. 4. 17.. -// Copyright © 2016년 CodersHigh. All rights reserved. -// - -import UIKit - -class ReserveRoomViewController: UITableViewController { - - //var reservation:Reservation? - - @IBOutlet weak var hostNameField: UITextField! - @IBOutlet weak var datePicker: UIDatePicker! - @IBOutlet weak var attendeesField: UITextField! - @IBOutlet weak var equipmentsField: UITextField! - @IBOutlet weak var cateringSwitch: UISwitch! - - - - override func viewDidLoad() { - super.viewDidLoad() - - // Uncomment the following line to preserve selection between presentations - // self.clearsSelectionOnViewWillAppear = false - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() - - - } - - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - @IBAction func makeReservation(sender: AnyObject) { - guard let reservation = makeReservation() else { - self.dismissViewControllerAnimated(true, completion: { - }) - return - } - - switch self.presentingViewController { - case let tabBarC as UITabBarController: - if let navigationC = tabBarC.selectedViewController as? UINavigationController, reservationListVC = navigationC.topViewController as? ReservationListViewController { - reservationListVC.addNewItem(reservation) - } - case let navigationC as UINavigationController: - if let reservationListVC = navigationC.topViewController as? ReservationListViewController { - reservationListVC.addNewItem(reservation) - } - case let reservationListVC as ReservationListViewController: - reservationListVC.addNewItem(reservation) - default: - print("Cannot find ReservationListViewController") - break - } - - self.dismissViewControllerAnimated(true, completion: { - }) - - } - - - @IBAction func cancelReservation(sender: AnyObject) { - self.dismissViewControllerAnimated(true, completion: nil) - } - - - - - - // MARK: - Table view data source - /* - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { - // #warning Incomplete implementation, return the number of sections - return 0 - } - - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - // #warning Incomplete implementation, return the number of rows - return 0 - } - - - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) - - // Configure the cell... - - return cell - } - */ - - /* - // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return false if you do not want the specified item to be editable. - return true - } - */ - - /* - // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { - // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } - } - */ - - /* - // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { - - } - */ - - /* - // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return false if you do not want the item to be re-orderable. - return true - } - */ - - - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - if segue.identifier == "ReserveDone" { - guard let newReservation = makeReservation(), reservationListVC = segue.destinationViewController as? ReservationListViewController else { - return - } - reservationListVC.addNewItem(newReservation) - } - } - - func makeReservation() -> Reservation? { - let newReservation = Reservation() - let host = hostNameField.text! - if host.isEmpty { - return nil - } - newReservation.hostName = host - newReservation.date = datePicker.date - if let equipmentArray = equipmentsField.text?.characters.split(",").map(String.init) { - newReservation.equipments = equipmentArray - } - newReservation.catering = cateringSwitch.on - return newReservation - } -} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift deleted file mode 100644 index 239fb74..0000000 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// ServiceListViewController.swift -// MeetingRoomsDynamic -// -// Created by Lingostar on 2016. 4. 5.. -// Copyright © 2016년 CodersHigh. All rights reserved. -// - -import UIKit - -class ServiceListViewController: UITableViewController { - - var branch:Branch? - - override func viewDidLoad() { - self.title = branch?.name - } - - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { - - return 1 - } - - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - guard let rowCount = branch?.services?.count else { - return 0 - } - return rowCount - } - - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("ServiceCell", forIndexPath: indexPath) - - guard let service = branch?.services?[indexPath.row] else { - return cell - } - cell.textLabel?.text = service.name - return cell - } - - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - if segue.identifier == "MeetingRoomSegue" { - guard let destination = segue.destinationViewController as? MeetingRoomsListController, selectedIndex = self.tableView.indexPathForSelectedRow?.row , service = branch?.services?[selectedIndex] else { - return - } - destination.service = service - } - } -} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.pbxproj b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7848f97 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.pbxproj @@ -0,0 +1,597 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 0413D72E1FADEF2E00DF618C /* DataCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D72D1FADEF2E00DF618C /* DataCenter.swift */; }; + 0413D7301FADF18E00DF618C /* BranchListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D72F1FADF18E00DF618C /* BranchListViewController.swift */; }; + 0413D7321FADF1A600DF618C /* ServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D7311FADF1A600DF618C /* ServiceListViewController.swift */; }; + 0413D7341FAE065400DF618C /* RoomInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D7331FAE065400DF618C /* RoomInfoViewController.swift */; }; + 0413D7361FAE09E900DF618C /* ReservationListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D7351FAE09E900DF618C /* ReservationListViewController.swift */; }; + 0413D7381FAE0A1400DF618C /* ReserveRoomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0413D7371FAE0A1400DF618C /* ReserveRoomViewController.swift */; }; + 0474F84F1F8E3F850043AEA0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0474F84E1F8E3F850043AEA0 /* AppDelegate.swift */; }; + 0474F8511F8E3F850043AEA0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0474F8501F8E3F850043AEA0 /* ViewController.swift */; }; + 0474F8541F8E3F850043AEA0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0474F8521F8E3F850043AEA0 /* Main.storyboard */; }; + 0474F8561F8E3F850043AEA0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0474F8551F8E3F850043AEA0 /* Assets.xcassets */; }; + 0474F8591F8E3F850043AEA0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0474F8571F8E3F850043AEA0 /* LaunchScreen.storyboard */; }; + 0474F8641F8E3F850043AEA0 /* MeetingRooms_01Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0474F8631F8E3F850043AEA0 /* MeetingRooms_01Tests.swift */; }; + 0474F86F1F8E3F850043AEA0 /* MeetingRooms_01UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0474F86E1F8E3F850043AEA0 /* MeetingRooms_01UITests.swift */; }; + 0474F87D1F8E3FFF0043AEA0 /* MeetingRoomListTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0474F87C1F8E3FFF0043AEA0 /* MeetingRoomListTableViewController.swift */; }; + 04D344DB1FAEA773008F4ABF /* TintColorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D344DA1FAEA773008F4ABF /* TintColorViewController.swift */; }; + 04D344DD1FAEE2FF008F4ABF /* EquipmentsDefault.plist in Resources */ = {isa = PBXBuildFile; fileRef = 04D344DC1FAEE2FF008F4ABF /* EquipmentsDefault.plist */; }; + 04D344DF1FAEE3BF008F4ABF /* EquipmentsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D344DE1FAEE3BF008F4ABF /* EquipmentsListViewController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0474F8601F8E3F850043AEA0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0474F8431F8E3F850043AEA0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0474F84A1F8E3F850043AEA0; + remoteInfo = MeetingRooms_01; + }; + 0474F86B1F8E3F850043AEA0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0474F8431F8E3F850043AEA0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0474F84A1F8E3F850043AEA0; + remoteInfo = MeetingRooms_01; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0413D72D1FADEF2E00DF618C /* DataCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataCenter.swift; sourceTree = ""; }; + 0413D72F1FADF18E00DF618C /* BranchListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BranchListViewController.swift; sourceTree = ""; }; + 0413D7311FADF1A600DF618C /* ServiceListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceListViewController.swift; sourceTree = ""; }; + 0413D7331FAE065400DF618C /* RoomInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomInfoViewController.swift; sourceTree = ""; }; + 0413D7351FAE09E900DF618C /* ReservationListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationListViewController.swift; sourceTree = ""; }; + 0413D7371FAE0A1400DF618C /* ReserveRoomViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReserveRoomViewController.swift; sourceTree = ""; }; + 0474F84B1F8E3F850043AEA0 /* MeetingRooms_01.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetingRooms_01.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0474F84E1F8E3F850043AEA0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 0474F8501F8E3F850043AEA0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 0474F8531F8E3F850043AEA0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0474F8551F8E3F850043AEA0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0474F8581F8E3F850043AEA0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0474F85A1F8E3F850043AEA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0474F85F1F8E3F850043AEA0 /* MeetingRooms_01Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeetingRooms_01Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0474F8631F8E3F850043AEA0 /* MeetingRooms_01Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRooms_01Tests.swift; sourceTree = ""; }; + 0474F8651F8E3F850043AEA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0474F86A1F8E3F850043AEA0 /* MeetingRooms_01UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeetingRooms_01UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0474F86E1F8E3F850043AEA0 /* MeetingRooms_01UITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRooms_01UITests.swift; sourceTree = ""; }; + 0474F8701F8E3F850043AEA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0474F87C1F8E3FFF0043AEA0 /* MeetingRoomListTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRoomListTableViewController.swift; sourceTree = ""; }; + 04D344DA1FAEA773008F4ABF /* TintColorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TintColorViewController.swift; sourceTree = ""; }; + 04D344DC1FAEE2FF008F4ABF /* EquipmentsDefault.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = EquipmentsDefault.plist; sourceTree = ""; }; + 04D344DE1FAEE3BF008F4ABF /* EquipmentsListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EquipmentsListViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0474F8481F8E3F850043AEA0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F85C1F8E3F850043AEA0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F8671F8E3F850043AEA0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0474F8421F8E3F850043AEA0 = { + isa = PBXGroup; + children = ( + 0474F84D1F8E3F850043AEA0 /* MeetingRooms_01 */, + 0474F8621F8E3F850043AEA0 /* MeetingRooms_01Tests */, + 0474F86D1F8E3F850043AEA0 /* MeetingRooms_01UITests */, + 0474F84C1F8E3F850043AEA0 /* Products */, + ); + sourceTree = ""; + }; + 0474F84C1F8E3F850043AEA0 /* Products */ = { + isa = PBXGroup; + children = ( + 0474F84B1F8E3F850043AEA0 /* MeetingRooms_01.app */, + 0474F85F1F8E3F850043AEA0 /* MeetingRooms_01Tests.xctest */, + 0474F86A1F8E3F850043AEA0 /* MeetingRooms_01UITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 0474F84D1F8E3F850043AEA0 /* MeetingRooms_01 */ = { + isa = PBXGroup; + children = ( + 0474F84E1F8E3F850043AEA0 /* AppDelegate.swift */, + 0474F8501F8E3F850043AEA0 /* ViewController.swift */, + 0474F8521F8E3F850043AEA0 /* Main.storyboard */, + 04D344DC1FAEE2FF008F4ABF /* EquipmentsDefault.plist */, + 04D344DE1FAEE3BF008F4ABF /* EquipmentsListViewController.swift */, + 04D344DA1FAEA773008F4ABF /* TintColorViewController.swift */, + 0413D7371FAE0A1400DF618C /* ReserveRoomViewController.swift */, + 0413D7351FAE09E900DF618C /* ReservationListViewController.swift */, + 0413D7331FAE065400DF618C /* RoomInfoViewController.swift */, + 0413D72D1FADEF2E00DF618C /* DataCenter.swift */, + 0413D72F1FADF18E00DF618C /* BranchListViewController.swift */, + 0413D7311FADF1A600DF618C /* ServiceListViewController.swift */, + 0474F87C1F8E3FFF0043AEA0 /* MeetingRoomListTableViewController.swift */, + 0474F8551F8E3F850043AEA0 /* Assets.xcassets */, + 0474F8571F8E3F850043AEA0 /* LaunchScreen.storyboard */, + 0474F85A1F8E3F850043AEA0 /* Info.plist */, + ); + path = MeetingRooms_01; + sourceTree = ""; + }; + 0474F8621F8E3F850043AEA0 /* MeetingRooms_01Tests */ = { + isa = PBXGroup; + children = ( + 0474F8631F8E3F850043AEA0 /* MeetingRooms_01Tests.swift */, + 0474F8651F8E3F850043AEA0 /* Info.plist */, + ); + path = MeetingRooms_01Tests; + sourceTree = ""; + }; + 0474F86D1F8E3F850043AEA0 /* MeetingRooms_01UITests */ = { + isa = PBXGroup; + children = ( + 0474F86E1F8E3F850043AEA0 /* MeetingRooms_01UITests.swift */, + 0474F8701F8E3F850043AEA0 /* Info.plist */, + ); + path = MeetingRooms_01UITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0474F84A1F8E3F850043AEA0 /* MeetingRooms_01 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0474F8731F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01" */; + buildPhases = ( + 0474F8471F8E3F850043AEA0 /* Sources */, + 0474F8481F8E3F850043AEA0 /* Frameworks */, + 0474F8491F8E3F850043AEA0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MeetingRooms_01; + productName = MeetingRooms_01; + productReference = 0474F84B1F8E3F850043AEA0 /* MeetingRooms_01.app */; + productType = "com.apple.product-type.application"; + }; + 0474F85E1F8E3F850043AEA0 /* MeetingRooms_01Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0474F8761F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01Tests" */; + buildPhases = ( + 0474F85B1F8E3F850043AEA0 /* Sources */, + 0474F85C1F8E3F850043AEA0 /* Frameworks */, + 0474F85D1F8E3F850043AEA0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0474F8611F8E3F850043AEA0 /* PBXTargetDependency */, + ); + name = MeetingRooms_01Tests; + productName = MeetingRooms_01Tests; + productReference = 0474F85F1F8E3F850043AEA0 /* MeetingRooms_01Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 0474F8691F8E3F850043AEA0 /* MeetingRooms_01UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0474F8791F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01UITests" */; + buildPhases = ( + 0474F8661F8E3F850043AEA0 /* Sources */, + 0474F8671F8E3F850043AEA0 /* Frameworks */, + 0474F8681F8E3F850043AEA0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0474F86C1F8E3F850043AEA0 /* PBXTargetDependency */, + ); + name = MeetingRooms_01UITests; + productName = MeetingRooms_01UITests; + productReference = 0474F86A1F8E3F850043AEA0 /* MeetingRooms_01UITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0474F8431F8E3F850043AEA0 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = Mac; + TargetAttributes = { + 0474F84A1F8E3F850043AEA0 = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; + 0474F85E1F8E3F850043AEA0 = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 0474F84A1F8E3F850043AEA0; + }; + 0474F8691F8E3F850043AEA0 = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 0474F84A1F8E3F850043AEA0; + }; + }; + }; + buildConfigurationList = 0474F8461F8E3F850043AEA0 /* Build configuration list for PBXProject "MeetingRooms_01" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0474F8421F8E3F850043AEA0; + productRefGroup = 0474F84C1F8E3F850043AEA0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0474F84A1F8E3F850043AEA0 /* MeetingRooms_01 */, + 0474F85E1F8E3F850043AEA0 /* MeetingRooms_01Tests */, + 0474F8691F8E3F850043AEA0 /* MeetingRooms_01UITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 0474F8491F8E3F850043AEA0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0474F8591F8E3F850043AEA0 /* LaunchScreen.storyboard in Resources */, + 04D344DD1FAEE2FF008F4ABF /* EquipmentsDefault.plist in Resources */, + 0474F8561F8E3F850043AEA0 /* Assets.xcassets in Resources */, + 0474F8541F8E3F850043AEA0 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F85D1F8E3F850043AEA0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F8681F8E3F850043AEA0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0474F8471F8E3F850043AEA0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0413D7341FAE065400DF618C /* RoomInfoViewController.swift in Sources */, + 0474F8511F8E3F850043AEA0 /* ViewController.swift in Sources */, + 0474F87D1F8E3FFF0043AEA0 /* MeetingRoomListTableViewController.swift in Sources */, + 04D344DF1FAEE3BF008F4ABF /* EquipmentsListViewController.swift in Sources */, + 0413D7361FAE09E900DF618C /* ReservationListViewController.swift in Sources */, + 0413D72E1FADEF2E00DF618C /* DataCenter.swift in Sources */, + 0413D7301FADF18E00DF618C /* BranchListViewController.swift in Sources */, + 0413D7321FADF1A600DF618C /* ServiceListViewController.swift in Sources */, + 0474F84F1F8E3F850043AEA0 /* AppDelegate.swift in Sources */, + 0413D7381FAE0A1400DF618C /* ReserveRoomViewController.swift in Sources */, + 04D344DB1FAEA773008F4ABF /* TintColorViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F85B1F8E3F850043AEA0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0474F8641F8E3F850043AEA0 /* MeetingRooms_01Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0474F8661F8E3F850043AEA0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0474F86F1F8E3F850043AEA0 /* MeetingRooms_01UITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0474F8611F8E3F850043AEA0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0474F84A1F8E3F850043AEA0 /* MeetingRooms_01 */; + targetProxy = 0474F8601F8E3F850043AEA0 /* PBXContainerItemProxy */; + }; + 0474F86C1F8E3F850043AEA0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0474F84A1F8E3F850043AEA0 /* MeetingRooms_01 */; + targetProxy = 0474F86B1F8E3F850043AEA0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 0474F8521F8E3F850043AEA0 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0474F8531F8E3F850043AEA0 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0474F8571F8E3F850043AEA0 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0474F8581F8E3F850043AEA0 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0474F8711F8E3F850043AEA0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 0474F8721F8E3F850043AEA0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0474F8741F8E3F850043AEA0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0474F8751F8E3F850043AEA0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 0474F8771F8E3F850043AEA0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MeetingRooms_01.app/MeetingRooms_01"; + }; + name = Debug; + }; + 0474F8781F8E3F850043AEA0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MeetingRooms_01.app/MeetingRooms_01"; + }; + name = Release; + }; + 0474F87A1F8E3F850043AEA0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeetingRooms_01; + }; + name = Debug; + }; + 0474F87B1F8E3F850043AEA0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MeetingRooms_01UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Hello.MeetingRooms-01UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeetingRooms_01; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0474F8461F8E3F850043AEA0 /* Build configuration list for PBXProject "MeetingRooms_01" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0474F8711F8E3F850043AEA0 /* Debug */, + 0474F8721F8E3F850043AEA0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0474F8731F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0474F8741F8E3F850043AEA0 /* Debug */, + 0474F8751F8E3F850043AEA0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0474F8761F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0474F8771F8E3F850043AEA0 /* Debug */, + 0474F8781F8E3F850043AEA0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0474F8791F8E3F850043AEA0 /* Build configuration list for PBXNativeTarget "MeetingRooms_01UITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0474F87A1F8E3F850043AEA0 /* Debug */, + 0474F87B1F8E3F850043AEA0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0474F8431F8E3F850043AEA0 /* Project object */; +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..eb8c3d8 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/AppDelegate.swift similarity index 59% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/AppDelegate.swift index 7624358..8550bbb 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/AppDelegate.swift @@ -1,9 +1,9 @@ // // AppDelegate.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 3. 13.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 11.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit @@ -14,38 +14,36 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. - return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. dataCenter.save() } - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - - let userDefaultColor = NSUserDefaults.standardUserDefaults().integerForKey(TintColorKey) - guard let defaultColor = TintColor(rawValue: userDefaultColor)?.color else { + let userDefaultColor = UserDefaults.standard.integer(forKey: TintColorKey) + guard let defaultColor = TintColor(rawValue:userDefaultColor)?.color else { return } - applyTintColor(defaultColor) + applyTintColor(color: defaultColor) } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. dataCenter.save() } diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 73% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/AppIcon.appiconset/Contents.json index eeea76c..d8db8d6 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -64,6 +84,11 @@ "idiom" : "ipad", "size" : "83.5x83.5", "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/Contents.json similarity index 100% rename from SampleCodes/MeetingRooms/MeetingRooms/Assets.xcassets/Contents.json rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/Contents.json diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/building_tab.imageset/Contents.json similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/Contents.json rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/building_tab.imageset/Contents.json diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/building_tab.png b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/building_tab.imageset/building_tab.png similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/building_tab.png rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/building_tab.imageset/building_tab.png diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/equipment_tab.imageset/Contents.json similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/Contents.json rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/equipment_tab.imageset/Contents.json diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/equipment_tab.png b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/equipment_tab.imageset/equipment_tab.png similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/equipment_tab.png rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/equipment_tab.imageset/equipment_tab.png diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/Contents.json b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/location.imageset/Contents.json similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/Contents.json rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/location.imageset/Contents.json diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/location.png b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/location.imageset/location.png similarity index 100% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/location.png rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Assets.xcassets/location.imageset/location.png diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/LaunchScreen.storyboard similarity index 58% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/LaunchScreen.storyboard index 2e721e1..f83f6fd 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/LaunchScreen.storyboard @@ -1,22 +1,20 @@ - + - + + + - - - - - + - - + + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/Main.storyboard similarity index 50% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/Main.storyboard index 5958a44..41493bc 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Base.lproj/Main.storyboard @@ -1,208 +1,332 @@ - - + + + + + - - + + + - - + + - - - + + + - - + + - - + + - + - - + + - - + + + - + - + - + - - + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - + + + + + + - - - + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - - - - - + - - + + - + + + + - + - + - + - - - + + + - + - - + + - - + + - - - - - - - - - - - - - - - + + - - + + - @@ -210,51 +334,51 @@ - + - - + + - - + + - - - + + - - + + - @@ -262,20 +386,20 @@ - + - - + + - - + + - @@ -285,459 +409,294 @@ - - + + - - + + - + - + - + - + - - - + + + - + - - + + - - + + - - - - - - - - - - - - - - - + + - - + + - - - - - - - - - - - - - - - - + + - - + + - - - - - - - - - - - - - - - + + - - + + - - - - - - + + + - - + + - - + + - - - - - - - - - + + - - + + - + - + - + - - - - - + + + + + - + - + - - + + - - - - - + + + - - + - + - + - - + + - - - + + + + + + + + + + + + + + + + + + + - - + + - - + + - + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - + + + - - + + - - + + - @@ -745,39 +704,45 @@ - - + + - - + + - + - + - + - - + + - + - - + + - - + + - + + + + + + + - - + + - + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/BranchListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/BranchListViewController.swift new file mode 100644 index 0000000..c56f1ae --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/BranchListViewController.swift @@ -0,0 +1,110 @@ +// +// BranchListViewController.swift +// MeetingRooms_01 +// +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import UIKit + +class BranchListViewController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem + self.navigationController?.isToolbarHidden = true + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + @IBAction func locationTurnOn(_ sender: Any) { + let locationAlert = UIAlertController(title: "위치 정보 요청", message: "위치 정보를 기반으로 가까운 지점을 자동으로 선택할 수 있습니다. 또는 지도앱에서 지점의 위치 정보를 제공해 드립니다. 선택하신 기능이 계속 제공됩니다. 환경설정에서 제공되는 기능을 변경할 수 있습니다.", preferredStyle: .actionSheet) + let locationAction = UIAlertAction(title: "위치정보 켜기", style: .default, handler: { (action:UIAlertAction) -> Void in print ("위치정보 켜기 선택")}) + let openMapAction = UIAlertAction(title: "지도앱에서 열기", style: .default, handler: { (action:UIAlertAction) -> Void in + print ("지도앱에서 열기 선택")}) + + locationAlert.addAction(locationAction) + locationAlert.addAction(openMapAction) + self.present(locationAlert, animated: true, completion: nil) + +} + + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + let rowCount = dataCenter.branches.count + return rowCount + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "BranchCell", for: indexPath) + + let branch = dataCenter.branches[indexPath.row] + cell.textLabel?.text = branch.name + + return cell + } + + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "ServiceSegue" { + if let destinaion = segue.destination as? ServiceListViewController, + let selectedIndex = self.tableView.indexPathForSelectedRow?.row { + destinaion.branch = dataCenter.branches[selectedIndex] as Branch + } + } + } +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/DataCenter.swift similarity index 52% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/DataCenter.swift index a547081..eba3b7f 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/DataCenter.swift @@ -1,28 +1,28 @@ // // DataCenter.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 4. 5.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. // import Foundation - -let dataCenter:DataCenter = DataCenter() let fileName = "BranchData.brch" +let dataCenter:DataCenter = DataCenter() class DataCenter { var branches:[Branch] = [] var filePath:String { get{ - let documentDirectory = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first! + let documentDirectory = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! return documentDirectory + fileName - }} + }} init() { - if NSFileManager.defaultManager().fileExistsAtPath(self.filePath) { + + if FileManager.default.fileExists(atPath: self.filePath) { //read - if let unarchArray = NSKeyedUnarchiver.unarchiveObjectWithFile(self.filePath) as? [Branch] { + if let unarchArray = NSKeyedUnarchiver.unarchiveObject(withFile: self.filePath) as? [Branch] { branches += unarchArray } } else { @@ -30,21 +30,20 @@ class DataCenter { branches += defaultData() } - } - func defaultData() -> Array { + + func defaultData() -> [Branch] { let banksyRoom = MeetingRoom(name: "Banksy", capacity: 4) let kahloRoom = MeetingRoom(name: "Kahlo", capacity: 8) let riveraRoom = MeetingRoom(name: "Rivera", capacity: 8) let picassoRoom = MeetingRoom(name: "Picasso", capacity: 10) - let vehicleService = Service(name: "차량예약") let meetingRoomService = Service(name: "회의실예약") let visitorService = Service(name: "방문자예약") let deskService = Service(name: "데스크예약") - meetingRoomService.item = [banksyRoom, kahloRoom, riveraRoom, picassoRoom] + meetingRoomService.items = [banksyRoom, kahloRoom, riveraRoom, picassoRoom] let pangyoBranch = Branch(name: "판교점") let samsungBranch = Branch(name: "삼성점") @@ -54,16 +53,15 @@ class DataCenter { let anamBranch = Branch(name: "안암점") pangyoBranch.services = [vehicleService, meetingRoomService, visitorService, deskService] - let branchArray = [samsungBranch, pangyoBranch, yeoksamBranch, sinrimBranch, songdoBranch, anamBranch] - return branchArray + branches += [pangyoBranch, samsungBranch, yeoksamBranch, sinrimBranch, songdoBranch, anamBranch] + return branches } - func save(){ + func save() { NSKeyedArchiver.archiveRootObject(self.branches, toFile: self.filePath) } } - class Branch:NSObject, NSCoding { let name:String var services:[Service]? @@ -71,40 +69,35 @@ class Branch:NSObject, NSCoding { init(name:String) { self.name = name } - required init?(coder aDecoder: NSCoder) { - self.name = aDecoder.decodeObjectForKey("name") as! String - self.services = aDecoder.decodeObjectForKey("services") as? [Service] + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.services = aDecoder.decodeObject(forKey: "services") as? [Service] } - - func encodeWithCoder(aCoder: NSCoder) { - aCoder.encodeObject(self.name, forKey: "name") - aCoder.encodeObject(self.services, forKey: "services") + func encode(with aCoder: NSCoder) { + aCoder.encode(self.name, forKey: "name") + aCoder.encode(self.services, forKey: "services") } + } - class Service:NSObject, NSCoding { let name:String - var item:[MeetingRoom]? + var items:[MeetingRoom]? - init (name:String){ + init(name:String) { self.name = name } required init?(coder aDecoder: NSCoder) { - self.name = aDecoder.decodeObjectForKey("name") as! String - self.item = aDecoder.decodeObjectForKey("item") as? [MeetingRoom] + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.items = aDecoder.decodeObject(forKey: "items") as? [MeetingRoom] } - - func encodeWithCoder(aCoder: NSCoder) { - aCoder.encodeObject(self.name, forKey: "name") - aCoder.encodeObject(self.item, forKey: "item") + func encode(with aCoder: NSCoder) { + aCoder.encode(self.name, forKey: "name") + aCoder.encode(self.items, forKey: "items") } - } - class MeetingRoom:NSObject, NSCoding { let name:String let capacity:Int @@ -116,20 +109,18 @@ class MeetingRoom:NSObject, NSCoding { } required init?(coder aDecoder: NSCoder) { - self.name = aDecoder.decodeObjectForKey("name") as! String - self.capacity = aDecoder.decodeIntegerForKey("capacity") - self.reservations = aDecoder.decodeObjectForKey("reservations") as? [Reservation] + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.capacity = aDecoder.decodeInteger(forKey: "capacity") + self.reservations = aDecoder.decodeObject(forKey: "reservations") as? [Reservation] } - func encodeWithCoder(aCoder: NSCoder) { - aCoder.encodeObject(self.name, forKey: "name") - aCoder.encodeInteger(self.capacity, forKey: "capacity") - aCoder.encodeObject(self.reservations, forKey: "reservations") + func encode(with aCoder: NSCoder) { + aCoder.encode(self.name, forKey: "name") + aCoder.encode(self.capacity, forKey: "capacity") + aCoder.encode(self.reservations, forKey: "reservations") } } - - class Reservation:NSObject, NSCoding { var hostName:String var date:NSDate @@ -145,21 +136,19 @@ class Reservation:NSObject, NSCoding { self.catering = false } - required init?(coder aDecoder: NSCoder) { - self.hostName = aDecoder.decodeObjectForKey("hostName") as! String - self.date = aDecoder.decodeObjectForKey("date") as! NSDate - self.attendees = aDecoder.decodeIntegerForKey("attendees") - self.equipments = aDecoder.decodeObjectForKey("equipments") as! [String] - self.catering = aDecoder.decodeBoolForKey("catering") + self.hostName = aDecoder.decodeObject(forKey: "hostName") as! String + self.date = aDecoder.decodeObject(forKey: "date") as! NSDate + self.attendees = aDecoder.decodeInteger(forKey: "attendees") + self.equipments = aDecoder.decodeObject(forKey: "equipments") as! [String] + self.catering = aDecoder.decodeBool(forKey: "catering") } - func encodeWithCoder(aCoder: NSCoder) { - aCoder.encodeObject(self.hostName, forKey: "hostName") - aCoder.encodeObject(self.date, forKey: "date") - aCoder.encodeInteger(self.attendees, forKey: "attendees") - aCoder.encodeObject(self.equipments, forKey: "equipments") - aCoder.encodeBool(self.catering, forKey: "catering") + func encode(with aCoder: NSCoder) { + aCoder.encode(self.hostName, forKey: "hostName") + aCoder.encode(self.date, forKey: "date") + aCoder.encode(self.attendees, forKey: "attendees") + aCoder.encode(self.equipments, forKey: "equipments") + aCoder.encode(self.catering, forKey: "catering") } } - diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsDefault.plist similarity index 95% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsDefault.plist index 5962ab0..880aae5 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsDefault.plist @@ -16,7 +16,7 @@ name - HP DL320e + HP DL320De amount 7 diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsListViewController.swift similarity index 60% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsListViewController.swift index b7dc7ce..435af9f 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/EquipmentsListViewController.swift @@ -1,18 +1,18 @@ // // EquipmentsListViewController.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 4. 20.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 11. 5.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit - let EquipmentFileName = "EquipmentsDefault" -class EquipmentsListViewController: UITableViewController { - var equipments:Array = [] +class EquipmentsListViewController: UITableViewController { + var equipments:Array = [] + override func viewDidLoad() { super.viewDidLoad() @@ -20,17 +20,16 @@ class EquipmentsListViewController: UITableViewController { // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() + // self.navigationItem.rightBarButtonItem = self.editButtonItem - guard let equipmentURL = NSBundle.mainBundle().URLForResource(EquipmentFileName, withExtension: "plist") else { + guard let equipmentURL = Bundle.main.url(forResource: EquipmentFileName, withExtension: "plist") else { print("No File") return } - if let equipmentsArray = NSArray(contentsOfURL: equipmentURL){ - print(equipmentsArray) - equipments += Array(equipmentsArray) + if let equipmentArray = NSArray(contentsOf: equipmentURL) { + print(equipmentArray) + equipments += Array(equipmentArray) } - } override func didReceiveMemoryWarning() { @@ -40,23 +39,25 @@ class EquipmentsListViewController: UITableViewController { // MARK: - Table view data source - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 1 } - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return equipments.count } - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("EquipmentCell", forIndexPath: indexPath) + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "EquipmentCell", for: indexPath) + // Configure the cell... guard let equipment = equipments[indexPath.row] as? [String:AnyObject] else { return cell } - + if let name = equipment["name"] as? String { cell.textLabel?.text = name } @@ -66,10 +67,11 @@ class EquipmentsListViewController: UITableViewController { return cell } + /* // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } @@ -77,11 +79,11 @@ class EquipmentsListViewController: UITableViewController { /* // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } @@ -89,14 +91,14 @@ class EquipmentsListViewController: UITableViewController { /* // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } @@ -106,7 +108,7 @@ class EquipmentsListViewController: UITableViewController { // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Info.plist similarity index 95% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Info.plist index 40c6215..16be3b6 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -16,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/MeetingRoomListTableViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/MeetingRoomListTableViewController.swift new file mode 100644 index 0000000..ba30a75 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/MeetingRoomListTableViewController.swift @@ -0,0 +1,101 @@ +// +// MeetingRoomListTableViewController.swift +// MeetingRooms_01 +// +// Created by Mac on 2017. 10. 11.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import UIKit + +class MeetingRoomListTableViewController: UITableViewController { + + var service:Service? + + override func viewDidLoad() { + super.viewDidLoad() + self.title = service?.name + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + guard let rowCount = service?.items?.count else { + return 0 + } + return rowCount + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ItemCell", for: indexPath) + guard let meetingRoom = service?.items?[indexPath.row] else { + return cell + } + + cell.textLabel!.text = meetingRoom.name + cell.detailTextLabel!.text = String(meetingRoom.capacity) + + return cell + } + + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "ReservationSegue" { + guard let destination = segue.destination as? ReservationListViewController, let selectedIndex = self.tableView.indexPathForSelectedRow?.row , let meetingRoom = service?.items?[selectedIndex] else { + return + } + destination.meetingRoom = meetingRoom + } + } + + +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReservationListViewController.swift similarity index 59% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReservationListViewController.swift index 12b6314..f31fbcf 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReservationListViewController.swift @@ -1,15 +1,15 @@ // // ReservationListViewController.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 4. 17.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit class ReservationListViewController: UITableViewController { - + var meetingRoom:MeetingRoom? var newReservation:Reservation? @@ -20,35 +20,35 @@ class ReservationListViewController: UITableViewController { // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() + // self.navigationItem.rightBarButtonItem = self.editButtonItem } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - - func addNewItem(reservation:Reservation) { - if (self.meetingRoom?.reservations?.append(reservation)) == nil { - self.meetingRoom?.reservations = [reservation] - } - dataCenter.save() - - self.tableView.reloadData() - - } - @IBAction func unwindToReserveList(segue:UIStoryboardSegue) { + @IBAction func unwindToReservationList(segue:UIStoryboardSegue) { print("unwind") } + func addNewItem(reservaion:Reservation) { + if (self.meetingRoom?.reservations?.append(reservaion)) == nil { + self.meetingRoom?.reservations = [reservaion] + } + dataCenter.save() + self.tableView.reloadData() + } + // MARK: - Table view data source - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + override func numberOfSections(in tableView: UITableView) -> Int { + // #warning Incomplete implementation, return the number of sections return 1 } - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + // #warning Incomplete implementation, return the number of rows guard let rowCount = meetingRoom?.reservations?.count else { return 0 } @@ -56,21 +56,22 @@ class ReservationListViewController: UITableViewController { } - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("ReservationCell", forIndexPath: indexPath) + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ReservationCell", for: indexPath) guard let reservation = meetingRoom?.reservations?[indexPath.row] else { return cell } cell.textLabel?.text = reservation.date.description cell.detailTextLabel?.text = reservation.hostName + return cell } /* // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } @@ -78,11 +79,11 @@ class ReservationListViewController: UITableViewController { /* // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } @@ -90,14 +91,14 @@ class ReservationListViewController: UITableViewController { /* // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } @@ -107,7 +108,7 @@ class ReservationListViewController: UITableViewController { // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReserveRoomViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReserveRoomViewController.swift new file mode 100644 index 0000000..40c6e53 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ReserveRoomViewController.swift @@ -0,0 +1,153 @@ +// +// ReserveRoomViewController.swift +// MeetingRooms_01 +// +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import UIKit + +class ReserveRoomViewController: UITableViewController { + @IBOutlet weak var hostNamefield: UITextField! + @IBOutlet weak var datePicker: UIDatePicker! + @IBOutlet weak var attendeesField: UITextField! + @IBOutlet weak var cateringSwitch: UISwitch! + + @IBOutlet weak var equipmentField: UITextField! + override func viewDidLoad() { + super.viewDidLoad() + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + func newReservation() -> Reservation? { + let reservation = Reservation() + let host = hostNamefield.text! + if host.isEmpty { + return nil + } + reservation.hostName = host + reservation.date = datePicker.date as NSDate + if let equipmentArray = equipmentField.text?.characters.split(separator: ",").map(String.init) { + reservation.equipments = equipmentArray + } + reservation.catering = cateringSwitch.isOn + return reservation + } + + @IBAction func cancelReservation(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } + @IBAction func makeReservation(_ sender: Any) { + guard let reservation = newReservation() else { + self.dismiss(animated: true, completion: nil) + return + } + + switch self.presentingViewController { + case let tabBarC as UITabBarController: + if let navigationC = tabBarC.selectedViewController as? UINavigationController, let reservationListVC = navigationC.topViewController as? ReservationListViewController { + reservationListVC.addNewItem(reservaion: reservation) + } + case let navigationC as UINavigationController: + if let reservationListVC = navigationC.topViewController as? ReservationListViewController { + reservationListVC.addNewItem(reservaion: reservation) + } + case let reservationListVC as ReservationListViewController: + reservationListVC.addNewItem(reservaion: reservation) + default: + print("Cannot find ReservationListViewController") + break + } + self.dismiss(animated: true, completion: {}) + } + + func prepareForSegue(segue:UIStoryboardSegue, sender: AnyObject?) { + if segue.identifier == "ReserveDone" { + guard let reservation = newReservation(), let reservationListVC = segue.destination as? ReservationListViewController else { + return + } + reservationListVC.addNewItem(reservaion: reservation) + } + + +/* + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + // #warning Incomplete implementation, return the number of sections + return 0 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + // #warning Incomplete implementation, return the number of rows + return 0 + } +*/ + /* + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) + + // Configure the cell... + + return cell + } + */ + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/RoomInfoViewController.swift similarity index 58% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/RoomInfoViewController.swift index c9c33b9..a58bf64 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/RoomInfoViewController.swift @@ -1,9 +1,9 @@ // // RoomInfoViewController.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 4. 16.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit @@ -17,34 +17,36 @@ class RoomInfoViewController: UITableViewController { // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() + // self.navigationItem.rightBarButtonItem = self.editButtonItem } - override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - - @IBAction func dismissModal(sender: AnyObject) { - self.dismissViewControllerAnimated(true, completion: nil) -} - + + + @IBAction func modalDismiss(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } + + +/* // MARK: - Table view data source - /* - override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + + override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 0 } - override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return 0 - }*/ - + } +*/ /* - override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) // Configure the cell... @@ -54,7 +56,7 @@ class RoomInfoViewController: UITableViewController { /* // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } @@ -62,11 +64,11 @@ class RoomInfoViewController: UITableViewController { /* // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } @@ -74,14 +76,14 @@ class RoomInfoViewController: UITableViewController { /* // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } @@ -91,7 +93,7 @@ class RoomInfoViewController: UITableViewController { // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ServiceListViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ServiceListViewController.swift new file mode 100644 index 0000000..27749fe --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ServiceListViewController.swift @@ -0,0 +1,106 @@ +// +// ServiceListViewController.swift +// MeetingRooms_01 +// +// Created by Mac on 2017. 11. 4.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import UIKit + +class ServiceListViewController: UITableViewController { + + var branch:Branch? + + override func viewDidLoad() { + super.viewDidLoad() + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem + + self.title = branch?.name + self.navigationController?.isToolbarHidden = false + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + // #warning Incomplete implementation, return the number of sections + return 1 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + guard let rowCount = branch?.services?.count else { + return 0 + } + return rowCount + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ServiceCell", for: indexPath) + + guard let service = branch?.services?[indexPath.row] else { + return cell + } + cell.textLabel?.text = service.name + return cell + } + + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "MeetingRoomSegue" { + guard let destination = segue.destination as? MeetingRoomListTableViewController, let selectedIndex = self.tableView.indexPathForSelectedRow?.row, let service = branch?.services?[selectedIndex] else { + return + } + destination.service = service + } + } +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/TintColorViewController.swift similarity index 50% rename from SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift rename to SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/TintColorViewController.swift index bead065..4619650 100644 --- a/SampleCodes/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/TintColorViewController.swift @@ -1,49 +1,57 @@ // // TintColorViewController.swift -// MeetingRoomsDynamic +// MeetingRooms_01 // -// Created by Lingostar on 2016. 4. 20.. -// Copyright © 2016년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 11. 5.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit enum TintColor:Int { - case Blue=0, Red, Green, Purple + case Blue = 0, Red, Green, Purple - var color:UIColor {get{ + var color:UIColor { get{ switch self { case .Blue: - return UIColor.blueColor() + return UIColor.blue case .Red: - return UIColor.redColor() + return UIColor.red case .Green: - return UIColor.greenColor() + return UIColor.green case .Purple: - return UIColor.purpleColor() + return UIColor.purple } - }} + } + } } -let TintColorKey = "TintColor" -func applyTintColor(color:UIColor){ - guard let window = UIApplication.sharedApplication().keyWindow else { +let TintColorKey = "TintColor" +func applyTintColor(color:UIColor) { + guard let window = UIApplication.shared.keyWindow else { return } window.tintColor = color } class TintColorViewController: UIViewController { - - @IBOutlet weak var tintColorSegment: UISegmentedControl! + @IBOutlet weak var tintColorSeg: UISegmentedControl! + @IBAction func tintColocChanged(_ sender: Any) { + let selectedIndex = self.tintColorSeg.selectedSegmentIndex + UserDefaults.standard.integer(forKey: TintColorKey) + + guard let changedColor = TintColor(rawValue: selectedIndex)?.color else { + return + } + applyTintColor(color: changedColor) + } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. - - let userDefaultColor = NSUserDefaults.standardUserDefaults().integerForKey(TintColorKey) - self.tintColorSegment.selectedSegmentIndex = userDefaultColor + let userDefaultColor = UserDefaults.standard.integer(forKey: TintColorKey) + self.tintColorSeg.selectedSegmentIndex = userDefaultColor } override func didReceiveMemoryWarning() { @@ -51,22 +59,12 @@ class TintColorViewController: UIViewController { // Dispose of any resources that can be recreated. } - @IBAction func tintColorChanged(sender: AnyObject) { - let selectedIndex = self.tintColorSegment.selectedSegmentIndex - NSUserDefaults.standardUserDefaults().setInteger(selectedIndex, forKey: TintColorKey) - guard let changedColor = TintColor(rawValue: selectedIndex)?.color else { - return - } - applyTintColor(changedColor) - } - - /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ViewController.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ViewController.swift new file mode 100644 index 0000000..bad5b9e --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01/ViewController.swift @@ -0,0 +1,25 @@ +// +// ViewController.swift +// MeetingRooms_01 +// +// Created by Mac on 2017. 10. 11.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + +} + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/Info.plist b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/MeetingRooms_01Tests.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/MeetingRooms_01Tests.swift new file mode 100644 index 0000000..a327823 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01Tests/MeetingRooms_01Tests.swift @@ -0,0 +1,36 @@ +// +// MeetingRooms_01Tests.swift +// MeetingRooms_01Tests +// +// Created by Mac on 2017. 10. 11.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest +@testable import MeetingRooms_01 + +class MeetingRooms_01Tests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/Info.plist b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/MeetingRooms_01UITests.swift b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/MeetingRooms_01UITests.swift new file mode 100644 index 0000000..ac12e68 --- /dev/null +++ b/SampleCodes/MeetingRoomsDynamic/MeetingRooms_01UITests/MeetingRooms_01UITests.swift @@ -0,0 +1,36 @@ +// +// MeetingRooms_01UITests.swift +// MeetingRooms_01UITests +// +// Created by Mac on 2017. 10. 11.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest + +class MeetingRooms_01UITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // 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. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/SampleCodes/MeetingRoomsDynamic/building.png b/SampleCodes/MeetingRoomsDynamic/building.png deleted file mode 100644 index 6b1aec0..0000000 Binary files a/SampleCodes/MeetingRoomsDynamic/building.png and /dev/null differ diff --git a/SampleCodes/MeetingRoomsDynamic/equipment.png b/SampleCodes/MeetingRoomsDynamic/equipment.png deleted file mode 100644 index b9132b8..0000000 Binary files a/SampleCodes/MeetingRoomsDynamic/equipment.png and /dev/null differ diff --git a/SampleCodes/MeetingRoomsDynamic/location.png b/SampleCodes/MeetingRoomsDynamic/location.png deleted file mode 100644 index 064332f..0000000 Binary files a/SampleCodes/MeetingRoomsDynamic/location.png and /dev/null differ diff --git a/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj b/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj index f11efb9..e96b5ea 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj +++ b/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj @@ -3,31 +3,70 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 48; objects = { /* Begin PBXBuildFile section */ - 2C99854A1C224D6000FB4C4B /* Money.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9985491C224D6000FB4C4B /* Money.swift */; }; - 2C9AD9EF1C214348004D41FE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9AD9EE1C214348004D41FE /* AppDelegate.swift */; }; - 2C9AD9F11C214348004D41FE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9AD9F01C214348004D41FE /* ViewController.swift */; }; - 2C9AD9F41C214348004D41FE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C9AD9F21C214348004D41FE /* Main.storyboard */; }; - 2C9AD9F61C214348004D41FE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C9AD9F51C214348004D41FE /* Assets.xcassets */; }; - 2C9AD9F91C214348004D41FE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C9AD9F71C214348004D41FE /* LaunchScreen.storyboard */; }; + 04BDBCF21F823DC5004CC97E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBCF11F823DC5004CC97E /* AppDelegate.swift */; }; + 04BDBCF41F823DC5004CC97E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBCF31F823DC5004CC97E /* ViewController.swift */; }; + 04BDBCF71F823DC5004CC97E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBCF51F823DC5004CC97E /* Main.storyboard */; }; + 04BDBCF91F823DC5004CC97E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBCF81F823DC5004CC97E /* Assets.xcassets */; }; + 04BDBCFC1F823DC5004CC97E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04BDBCFA1F823DC5004CC97E /* LaunchScreen.storyboard */; }; + 04BDBD071F823DC5004CC97E /* MoneyConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD061F823DC5004CC97E /* MoneyConverterTests.swift */; }; + 04BDBD121F823DC5004CC97E /* MoneyConverterUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD111F823DC5004CC97E /* MoneyConverterUITests.swift */; }; + 04BDBD201F8249D4004CC97E /* Money.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BDBD1F1F8249D4004CC97E /* Money.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 04BDBD031F823DC5004CC97E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 04BDBCE61F823DC5004CC97E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 04BDBCED1F823DC5004CC97E; + remoteInfo = MoneyConverter; + }; + 04BDBD0E1F823DC5004CC97E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 04BDBCE61F823DC5004CC97E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 04BDBCED1F823DC5004CC97E; + remoteInfo = MoneyConverter; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 2C9985491C224D6000FB4C4B /* Money.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Money.swift; sourceTree = ""; }; - 2C9AD9EB1C214347004D41FE /* MoneyConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoneyConverter.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C9AD9EE1C214348004D41FE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 2C9AD9F01C214348004D41FE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 2C9AD9F31C214348004D41FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 2C9AD9F51C214348004D41FE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C9AD9F81C214348004D41FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 2C9AD9FA1C214348004D41FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBCEE1F823DC5004CC97E /* MoneyConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoneyConverter.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBCF11F823DC5004CC97E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 04BDBCF31F823DC5004CC97E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 04BDBCF61F823DC5004CC97E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 04BDBCF81F823DC5004CC97E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 04BDBCFB1F823DC5004CC97E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 04BDBCFD1F823DC5004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD021F823DC5004CC97E /* MoneyConverterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoneyConverterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBD061F823DC5004CC97E /* MoneyConverterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoneyConverterTests.swift; sourceTree = ""; }; + 04BDBD081F823DC5004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD0D1F823DC5004CC97E /* MoneyConverterUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoneyConverterUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 04BDBD111F823DC5004CC97E /* MoneyConverterUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoneyConverterUITests.swift; sourceTree = ""; }; + 04BDBD131F823DC5004CC97E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 04BDBD1F1F8249D4004CC97E /* Money.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Money.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2C9AD9E81C214347004D41FE /* Frameworks */ = { + 04BDBCEB1F823DC5004CC97E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBCFF1F823DC5004CC97E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD0A1F823DC5004CC97E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -37,46 +76,68 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2C9AD9E21C214347004D41FE = { + 04BDBCE51F823DC5004CC97E = { isa = PBXGroup; children = ( - 2C9AD9ED1C214348004D41FE /* MoneyConverter */, - 2C9AD9EC1C214347004D41FE /* Products */, + 04BDBCF01F823DC5004CC97E /* MoneyConverter */, + 04BDBD051F823DC5004CC97E /* MoneyConverterTests */, + 04BDBD101F823DC5004CC97E /* MoneyConverterUITests */, + 04BDBCEF1F823DC5004CC97E /* Products */, ); sourceTree = ""; }; - 2C9AD9EC1C214347004D41FE /* Products */ = { + 04BDBCEF1F823DC5004CC97E /* Products */ = { isa = PBXGroup; children = ( - 2C9AD9EB1C214347004D41FE /* MoneyConverter.app */, + 04BDBCEE1F823DC5004CC97E /* MoneyConverter.app */, + 04BDBD021F823DC5004CC97E /* MoneyConverterTests.xctest */, + 04BDBD0D1F823DC5004CC97E /* MoneyConverterUITests.xctest */, ); name = Products; sourceTree = ""; }; - 2C9AD9ED1C214348004D41FE /* MoneyConverter */ = { + 04BDBCF01F823DC5004CC97E /* MoneyConverter */ = { isa = PBXGroup; children = ( - 2C9AD9EE1C214348004D41FE /* AppDelegate.swift */, - 2C9AD9F01C214348004D41FE /* ViewController.swift */, - 2C9985491C224D6000FB4C4B /* Money.swift */, - 2C9AD9F21C214348004D41FE /* Main.storyboard */, - 2C9AD9F51C214348004D41FE /* Assets.xcassets */, - 2C9AD9F71C214348004D41FE /* LaunchScreen.storyboard */, - 2C9AD9FA1C214348004D41FE /* Info.plist */, + 04BDBCF11F823DC5004CC97E /* AppDelegate.swift */, + 04BDBCF31F823DC5004CC97E /* ViewController.swift */, + 04BDBCF51F823DC5004CC97E /* Main.storyboard */, + 04BDBD1F1F8249D4004CC97E /* Money.swift */, + 04BDBCF81F823DC5004CC97E /* Assets.xcassets */, + 04BDBCFA1F823DC5004CC97E /* LaunchScreen.storyboard */, + 04BDBCFD1F823DC5004CC97E /* Info.plist */, ); path = MoneyConverter; sourceTree = ""; }; + 04BDBD051F823DC5004CC97E /* MoneyConverterTests */ = { + isa = PBXGroup; + children = ( + 04BDBD061F823DC5004CC97E /* MoneyConverterTests.swift */, + 04BDBD081F823DC5004CC97E /* Info.plist */, + ); + path = MoneyConverterTests; + sourceTree = ""; + }; + 04BDBD101F823DC5004CC97E /* MoneyConverterUITests */ = { + isa = PBXGroup; + children = ( + 04BDBD111F823DC5004CC97E /* MoneyConverterUITests.swift */, + 04BDBD131F823DC5004CC97E /* Info.plist */, + ); + path = MoneyConverterUITests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 2C9AD9EA1C214347004D41FE /* MoneyConverter */ = { + 04BDBCED1F823DC5004CC97E /* MoneyConverter */ = { isa = PBXNativeTarget; - buildConfigurationList = 2C9AD9FD1C214348004D41FE /* Build configuration list for PBXNativeTarget "MoneyConverter" */; + buildConfigurationList = 04BDBD161F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverter" */; buildPhases = ( - 2C9AD9E71C214347004D41FE /* Sources */, - 2C9AD9E81C214347004D41FE /* Frameworks */, - 2C9AD9E91C214347004D41FE /* Resources */, + 04BDBCEA1F823DC5004CC97E /* Sources */, + 04BDBCEB1F823DC5004CC97E /* Frameworks */, + 04BDBCEC1F823DC5004CC97E /* Resources */, ); buildRules = ( ); @@ -84,81 +145,173 @@ ); name = MoneyConverter; productName = MoneyConverter; - productReference = 2C9AD9EB1C214347004D41FE /* MoneyConverter.app */; + productReference = 04BDBCEE1F823DC5004CC97E /* MoneyConverter.app */; productType = "com.apple.product-type.application"; }; + 04BDBD011F823DC5004CC97E /* MoneyConverterTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 04BDBD191F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverterTests" */; + buildPhases = ( + 04BDBCFE1F823DC5004CC97E /* Sources */, + 04BDBCFF1F823DC5004CC97E /* Frameworks */, + 04BDBD001F823DC5004CC97E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 04BDBD041F823DC5004CC97E /* PBXTargetDependency */, + ); + name = MoneyConverterTests; + productName = MoneyConverterTests; + productReference = 04BDBD021F823DC5004CC97E /* MoneyConverterTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 04BDBD0C1F823DC5004CC97E /* MoneyConverterUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 04BDBD1C1F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverterUITests" */; + buildPhases = ( + 04BDBD091F823DC5004CC97E /* Sources */, + 04BDBD0A1F823DC5004CC97E /* Frameworks */, + 04BDBD0B1F823DC5004CC97E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 04BDBD0F1F823DC5004CC97E /* PBXTargetDependency */, + ); + name = MoneyConverterUITests; + productName = MoneyConverterUITests; + productReference = 04BDBD0D1F823DC5004CC97E /* MoneyConverterUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 2C9AD9E31C214347004D41FE /* Project object */ = { + 04BDBCE61F823DC5004CC97E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = CodersHigh; + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = Mac; TargetAttributes = { - 2C9AD9EA1C214347004D41FE = { - CreatedOnToolsVersion = 7.1; + 04BDBCED1F823DC5004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; + 04BDBD011F823DC5004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 04BDBCED1F823DC5004CC97E; + }; + 04BDBD0C1F823DC5004CC97E = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + TestTargetID = 04BDBCED1F823DC5004CC97E; }; }; }; - buildConfigurationList = 2C9AD9E61C214347004D41FE /* Build configuration list for PBXProject "MoneyConverter" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + buildConfigurationList = 04BDBCE91F823DC5004CC97E /* Build configuration list for PBXProject "MoneyConverter" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); - mainGroup = 2C9AD9E21C214347004D41FE; - productRefGroup = 2C9AD9EC1C214347004D41FE /* Products */; + mainGroup = 04BDBCE51F823DC5004CC97E; + productRefGroup = 04BDBCEF1F823DC5004CC97E /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 2C9AD9EA1C214347004D41FE /* MoneyConverter */, + 04BDBCED1F823DC5004CC97E /* MoneyConverter */, + 04BDBD011F823DC5004CC97E /* MoneyConverterTests */, + 04BDBD0C1F823DC5004CC97E /* MoneyConverterUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 2C9AD9E91C214347004D41FE /* Resources */ = { + 04BDBCEC1F823DC5004CC97E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBCFC1F823DC5004CC97E /* LaunchScreen.storyboard in Resources */, + 04BDBCF91F823DC5004CC97E /* Assets.xcassets in Resources */, + 04BDBCF71F823DC5004CC97E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD001F823DC5004CC97E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD0B1F823DC5004CC97E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C9AD9F91C214348004D41FE /* LaunchScreen.storyboard in Resources */, - 2C9AD9F61C214348004D41FE /* Assets.xcassets in Resources */, - 2C9AD9F41C214348004D41FE /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 2C9AD9E71C214347004D41FE /* Sources */ = { + 04BDBCEA1F823DC5004CC97E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBD201F8249D4004CC97E /* Money.swift in Sources */, + 04BDBCF41F823DC5004CC97E /* ViewController.swift in Sources */, + 04BDBCF21F823DC5004CC97E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBCFE1F823DC5004CC97E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C99854A1C224D6000FB4C4B /* Money.swift in Sources */, - 2C9AD9F11C214348004D41FE /* ViewController.swift in Sources */, - 2C9AD9EF1C214348004D41FE /* AppDelegate.swift in Sources */, + 04BDBD071F823DC5004CC97E /* MoneyConverterTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 04BDBD091F823DC5004CC97E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04BDBD121F823DC5004CC97E /* MoneyConverterUITests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 04BDBD041F823DC5004CC97E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 04BDBCED1F823DC5004CC97E /* MoneyConverter */; + targetProxy = 04BDBD031F823DC5004CC97E /* PBXContainerItemProxy */; + }; + 04BDBD0F1F823DC5004CC97E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 04BDBCED1F823DC5004CC97E /* MoneyConverter */; + targetProxy = 04BDBD0E1F823DC5004CC97E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 2C9AD9F21C214348004D41FE /* Main.storyboard */ = { + 04BDBCF51F823DC5004CC97E /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C9AD9F31C214348004D41FE /* Base */, + 04BDBCF61F823DC5004CC97E /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 2C9AD9F71C214348004D41FE /* LaunchScreen.storyboard */ = { + 04BDBCFA1F823DC5004CC97E /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 2C9AD9F81C214348004D41FE /* Base */, + 04BDBCFB1F823DC5004CC97E /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -166,29 +319,41 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 2C9AD9FB1C214348004D41FE /* Debug */ = { + 04BDBD141F823DC5004CC97E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -202,38 +367,50 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 2C9AD9FC1C214348004D41FE /* Release */ = { + 04BDBD151F823DC5004CC97E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -241,58 +418,144 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; }; - 2C9AD9FE1C214348004D41FE /* Debug */ = { + 04BDBD171F823DC5004CC97E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = MoneyConverter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MoneyConverter; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverter; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 2C9AD9FF1C214348004D41FE /* Release */ = { + 04BDBD181F823DC5004CC97E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = MoneyConverter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MoneyConverter; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverter; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 04BDBD1A1F823DC5004CC97E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MoneyConverterTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverterTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoneyConverter.app/MoneyConverter"; + }; + name = Debug; + }; + 04BDBD1B1F823DC5004CC97E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MoneyConverterTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverterTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoneyConverter.app/MoneyConverter"; + }; + name = Release; + }; + 04BDBD1D1F823DC5004CC97E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MoneyConverterUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverterUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MoneyConverter; + }; + name = Debug; + }; + 04BDBD1E1F823DC5004CC97E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MoneyConverterUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Hello.MoneyConverterUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MoneyConverter; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2C9AD9E61C214347004D41FE /* Build configuration list for PBXProject "MoneyConverter" */ = { + 04BDBCE91F823DC5004CC97E /* Build configuration list for PBXProject "MoneyConverter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 04BDBD141F823DC5004CC97E /* Debug */, + 04BDBD151F823DC5004CC97E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 04BDBD161F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 04BDBD171F823DC5004CC97E /* Debug */, + 04BDBD181F823DC5004CC97E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 04BDBD191F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverterTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C9AD9FB1C214348004D41FE /* Debug */, - 2C9AD9FC1C214348004D41FE /* Release */, + 04BDBD1A1F823DC5004CC97E /* Debug */, + 04BDBD1B1F823DC5004CC97E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2C9AD9FD1C214348004D41FE /* Build configuration list for PBXNativeTarget "MoneyConverter" */ = { + 04BDBD1C1F823DC5004CC97E /* Build configuration list for PBXNativeTarget "MoneyConverterUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C9AD9FE1C214348004D41FE /* Debug */, - 2C9AD9FF1C214348004D41FE /* Release */, + 04BDBD1D1F823DC5004CC97E /* Debug */, + 04BDBD1E1F823DC5004CC97E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 2C9AD9E31C214347004D41FE /* Project object */; + rootObject = 04BDBCE61F823DC5004CC97E /* Project object */; } diff --git a/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5566428 --- /dev/null +++ b/SampleCodes/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SampleCodes/MoneyConverter/MoneyConverter/AppDelegate.swift b/SampleCodes/MoneyConverter/MoneyConverter/AppDelegate.swift index 2217838..4977588 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/AppDelegate.swift +++ b/SampleCodes/MoneyConverter/MoneyConverter/AppDelegate.swift @@ -2,8 +2,8 @@ // AppDelegate.swift // MoneyConverter // -// Created by Lingostar on 2015. 12. 16.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit @@ -14,37 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. - - - - - - - return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/SampleCodes/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json b/SampleCodes/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..1d060ed 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SampleCodes/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard b/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard index 2e721e1..f83f6fd 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard +++ b/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard @@ -1,22 +1,20 @@ - + - + + + - - - - - + - - + + diff --git a/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard b/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard index 89f6126..098609f 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard +++ b/SampleCodes/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard @@ -1,81 +1,80 @@ - - + + + + + - - + + + - - - - - + - - + + + - - - + - - - - + + - - - - + + + - + diff --git a/SampleCodes/MoneyConverter/MoneyConverter/Info.plist b/SampleCodes/MoneyConverter/MoneyConverter/Info.plist index 40c6215..16be3b6 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/Info.plist +++ b/SampleCodes/MoneyConverter/MoneyConverter/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -16,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/SampleCodes/MoneyConverter/MoneyConverter/Money.swift b/SampleCodes/MoneyConverter/MoneyConverter/Money.swift index 169ee64..65df134 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/Money.swift +++ b/SampleCodes/MoneyConverter/MoneyConverter/Money.swift @@ -2,33 +2,32 @@ // Money.swift // MoneyConverter // -// Created by Lingostar on 2015. 12. 17.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. // import Foundation -import MapKit -enum Currency:Int { + +enum Currency: Int { case USD = 0, KRW, JPY, EUR - var symbol:String { - get { + var ratio: Double { + get{ switch self { - case .USD : return "$" - case .KRW : return "₩" - case .JPY : return "¥" - case .EUR : return "€" + case .USD: return 1.0 + case .KRW: return 1178.5 + case .JPY: return 122.45 + case .EUR: return 0.92 } } } - - var ratio:Double { - get { + var symbol: String { + get{ switch self { - case .USD : return 1.0 - case .KRW : return 1178.5 - case .JPY : return 122.45 - case .EUR : return 0.92 + case .USD: return "$" + case .KRW: return "₩" + case .JPY: return "¥" + case .EUR: return "€" } } } @@ -36,25 +35,21 @@ enum Currency:Int { struct Money { - //var location:CLLocationCoordinate2D - var usdollar = 0.0 - init(_ _usdollar:Double){ + init(_ _usdollar: Double) { usdollar = _usdollar } - init(_ amount:Double, currency:Currency){ + init(_ amount: Double, currency: Currency) { usdollar = amount / currency.ratio } - - func valueInCurrency(currency:Currency) -> String { - return "\(currency.symbol) " + "\(usdollar*currency.ratio)" + + func valueInCurrency(currency: Currency) -> String { + return "\(currency.symbol)" + "\(usdollar * currency.ratio)" } -} - - -let money = Money(120.0) -let koreanIncome = Money(500_000 , currency:.KRW) +} +let myMoney = Money(120) +let incomeInKRW = Money(350_000, currency: .KRW) diff --git a/SampleCodes/MoneyConverter/MoneyConverter/ViewController.swift b/SampleCodes/MoneyConverter/MoneyConverter/ViewController.swift index 659723e..7bd3729 100644 --- a/SampleCodes/MoneyConverter/MoneyConverter/ViewController.swift +++ b/SampleCodes/MoneyConverter/MoneyConverter/ViewController.swift @@ -2,18 +2,19 @@ // ViewController.swift // MoneyConverter // -// Created by Lingostar on 2015. 12. 16.. -// Copyright © 2015년 CodersHigh. All rights reserved. +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. // import UIKit class ViewController: UIViewController { - + @IBOutlet weak var currencySegment: UISegmentedControl! + @IBOutlet weak var sourceMoneyField: UITextField! - @IBOutlet weak var targetMoneyLabel: UILabel! + @IBOutlet weak var targetMoneyLable: UILabel! override func viewDidLoad() { super.viewDidLoad() @@ -25,43 +26,29 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - @IBAction func convertMoney(sender: AnyObject) { - guard let sourceCurrecy = Currency(rawValue:currencySegment.selectedSegmentIndex) else { + @IBAction func convertMoney(_ sender: Any) { + + guard let sourceCurrency = Currency(rawValue: currencySegment.selectedSegmentIndex) else { print("Source Currency Error") return - } // if let 의 확장판. if let을 썼을때 indent 불편을 없앰. - + } + guard let sourceAmount = Double(sourceMoneyField.text!) else { - targetMoneyLabel.text = "Error" + targetMoneyLable.text = "Error" return } - let sourceMoney = Money(sourceAmount, currency: sourceCurrecy) - + let sourceMoney = Money(_ : sourceAmount, currency: sourceCurrency) + var targetMoneyString = "" - for (var i=0 ; i < 4 ; i++){ - targetMoneyString += sourceMoney.valueInCurrency(Currency.init(rawValue: i)!) + for i in 0...3 { + targetMoneyString += + sourceMoney.valueInCurrency(currency: Currency.init(rawValue: i)!) targetMoneyString += "\r\n" } - targetMoneyLabel.text = targetMoneyString - - /*if let sourceCurrecy = Currency(rawValue:currencySegment.selectedSegmentIndex) { - - if let sourceAmount = Double(sourceMoneyField.text!) { - - let sourceMoney = Money(sourceAmount, currency: sourceCurrecy) - - var targetMoneyString = "" - for (var i=0 ; i < 4 ; i++){ - targetMoneyString += sourceMoney.valueInCurrency(Currency.init(rawValue: i)!) - targetMoneyString += "\r\n" - } - - targetMoneyLabel.text = targetMoneyString - } - }*/ + targetMoneyLable.text = targetMoneyString } - + } diff --git a/SampleCodes/MoneyConverter/MoneyConverterTests/Info.plist b/SampleCodes/MoneyConverter/MoneyConverterTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MoneyConverter/MoneyConverterTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MoneyConverter/MoneyConverterTests/MoneyConverterTests.swift b/SampleCodes/MoneyConverter/MoneyConverterTests/MoneyConverterTests.swift new file mode 100644 index 0000000..3df966b --- /dev/null +++ b/SampleCodes/MoneyConverter/MoneyConverterTests/MoneyConverterTests.swift @@ -0,0 +1,36 @@ +// +// MoneyConverterTests.swift +// MoneyConverterTests +// +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest +@testable import MoneyConverter + +class MoneyConverterTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/SampleCodes/MoneyConverter/MoneyConverterUITests/Info.plist b/SampleCodes/MoneyConverter/MoneyConverterUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/SampleCodes/MoneyConverter/MoneyConverterUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/SampleCodes/MoneyConverter/MoneyConverterUITests/MoneyConverterUITests.swift b/SampleCodes/MoneyConverter/MoneyConverterUITests/MoneyConverterUITests.swift new file mode 100644 index 0000000..bcf0207 --- /dev/null +++ b/SampleCodes/MoneyConverter/MoneyConverterUITests/MoneyConverterUITests.swift @@ -0,0 +1,36 @@ +// +// MoneyConverterUITests.swift +// MoneyConverterUITests +// +// Created by Mac on 2017. 10. 2.. +// Copyright © 2017년 Mac. All rights reserved. +// + +import XCTest + +class MoneyConverterUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // 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. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +}