diff --git a/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.pbxproj b/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.pbxproj new file mode 100644 index 0000000..05da79c --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.pbxproj @@ -0,0 +1,529 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + B0500D201FAC4363002E177E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D1F1FAC4363002E177E /* AppDelegate.swift */; }; + B0500D221FAC4363002E177E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D211FAC4363002E177E /* ViewController.swift */; }; + B0500D251FAC4363002E177E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D231FAC4363002E177E /* Main.storyboard */; }; + B0500D271FAC4363002E177E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0500D261FAC4363002E177E /* Assets.xcassets */; }; + B0500D2A1FAC4363002E177E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D281FAC4363002E177E /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B0500D311FAC4364002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D141FAC4363002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D1B1FAC4363002E177E; + remoteInfo = BareBasic; + }; + B0500D3C1FAC4364002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D141FAC4363002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D1B1FAC4363002E177E; + remoteInfo = BareBasic; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + B0500D1C1FAC4363002E177E /* BareBasic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BareBasic.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D1F1FAC4363002E177E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B0500D211FAC4363002E177E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + B0500D241FAC4363002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B0500D261FAC4363002E177E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B0500D291FAC4363002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B0500D2B1FAC4363002E177E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B0500D301FAC4364002E177E /* BareBasicTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BareBasicTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D3B1FAC4364002E177E /* BareBasicUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BareBasicUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B0500D191FAC4363002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D2D1FAC4364002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D381FAC4364002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B0500D131FAC4363002E177E = { + isa = PBXGroup; + children = ( + B0500D1E1FAC4363002E177E /* BareBasic */, + B0500D1D1FAC4363002E177E /* Products */, + ); + sourceTree = ""; + }; + B0500D1D1FAC4363002E177E /* Products */ = { + isa = PBXGroup; + children = ( + B0500D1C1FAC4363002E177E /* BareBasic.app */, + B0500D301FAC4364002E177E /* BareBasicTests.xctest */, + B0500D3B1FAC4364002E177E /* BareBasicUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B0500D1E1FAC4363002E177E /* BareBasic */ = { + isa = PBXGroup; + children = ( + B0500D1F1FAC4363002E177E /* AppDelegate.swift */, + B0500D211FAC4363002E177E /* ViewController.swift */, + B0500D231FAC4363002E177E /* Main.storyboard */, + B0500D261FAC4363002E177E /* Assets.xcassets */, + B0500D281FAC4363002E177E /* LaunchScreen.storyboard */, + B0500D2B1FAC4363002E177E /* Info.plist */, + ); + path = BareBasic; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B0500D1B1FAC4363002E177E /* BareBasic */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D441FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasic" */; + buildPhases = ( + B0500D181FAC4363002E177E /* Sources */, + B0500D191FAC4363002E177E /* Frameworks */, + B0500D1A1FAC4363002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = BareBasic; + productName = BareBasic; + productReference = B0500D1C1FAC4363002E177E /* BareBasic.app */; + productType = "com.apple.product-type.application"; + }; + B0500D2F1FAC4364002E177E /* BareBasicTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D471FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasicTests" */; + buildPhases = ( + B0500D2C1FAC4364002E177E /* Sources */, + B0500D2D1FAC4364002E177E /* Frameworks */, + B0500D2E1FAC4364002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500D321FAC4364002E177E /* PBXTargetDependency */, + ); + name = BareBasicTests; + productName = BareBasicTests; + productReference = B0500D301FAC4364002E177E /* BareBasicTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B0500D3A1FAC4364002E177E /* BareBasicUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D4A1FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasicUITests" */; + buildPhases = ( + B0500D371FAC4364002E177E /* Sources */, + B0500D381FAC4364002E177E /* Frameworks */, + B0500D391FAC4364002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500D3D1FAC4364002E177E /* PBXTargetDependency */, + ); + name = BareBasicUITests; + productName = BareBasicUITests; + productReference = B0500D3B1FAC4364002E177E /* BareBasicUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B0500D141FAC4363002E177E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Taehyeon Kim"; + TargetAttributes = { + B0500D1B1FAC4363002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + }; + B0500D2F1FAC4364002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D1B1FAC4363002E177E; + }; + B0500D3A1FAC4364002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D1B1FAC4363002E177E; + }; + }; + }; + buildConfigurationList = B0500D171FAC4363002E177E /* Build configuration list for PBXProject "BareBasic" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B0500D131FAC4363002E177E; + productRefGroup = B0500D1D1FAC4363002E177E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B0500D1B1FAC4363002E177E /* BareBasic */, + B0500D2F1FAC4364002E177E /* BareBasicTests */, + B0500D3A1FAC4364002E177E /* BareBasicUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B0500D1A1FAC4363002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D2A1FAC4363002E177E /* LaunchScreen.storyboard in Resources */, + B0500D271FAC4363002E177E /* Assets.xcassets in Resources */, + B0500D251FAC4363002E177E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D2E1FAC4364002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D391FAC4364002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B0500D181FAC4363002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D221FAC4363002E177E /* ViewController.swift in Sources */, + B0500D201FAC4363002E177E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D2C1FAC4364002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D371FAC4364002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B0500D321FAC4364002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D1B1FAC4363002E177E /* BareBasic */; + targetProxy = B0500D311FAC4364002E177E /* PBXContainerItemProxy */; + }; + B0500D3D1FAC4364002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D1B1FAC4363002E177E /* BareBasic */; + targetProxy = B0500D3C1FAC4364002E177E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + B0500D231FAC4363002E177E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D241FAC4363002E177E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B0500D281FAC4363002E177E /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D291FAC4363002E177E /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B0500D421FAC4364002E177E /* 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; + }; + B0500D431FAC4364002E177E /* 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; + }; + B0500D451FAC4364002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasic/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasic"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B0500D461FAC4364002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasic/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasic"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + B0500D481FAC4364002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasicTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasicTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BareBasic.app/BareBasic"; + }; + name = Debug; + }; + B0500D491FAC4364002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasicTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasicTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BareBasic.app/BareBasic"; + }; + name = Release; + }; + B0500D4B1FAC4364002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasicUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasicUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = BareBasic; + }; + name = Debug; + }; + B0500D4C1FAC4364002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = BareBasicUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.BareBasicUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = BareBasic; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B0500D171FAC4363002E177E /* Build configuration list for PBXProject "BareBasic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D421FAC4364002E177E /* Debug */, + B0500D431FAC4364002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D441FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D451FAC4364002E177E /* Debug */, + B0500D461FAC4364002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D471FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasicTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D481FAC4364002E177E /* Debug */, + B0500D491FAC4364002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D4A1FAC4364002E177E /* Build configuration list for PBXNativeTarget "BareBasicUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D4B1FAC4364002E177E /* Debug */, + B0500D4C1FAC4364002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B0500D141FAC4363002E177E /* Project object */; +} diff --git a/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a2f94f8 --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/BareBasic/BareBasic/AppDelegate.swift b/TaehyeonKim/BareBasic/BareBasic/AppDelegate.swift new file mode 100644 index 0000000..9f5af2a --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// BareBasic +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + 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 invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + 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 active state; here you can undo many of the changes made on entering the background. + } + + 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) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TaehyeonKim/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/BareBasic/BareBasic/Base.lproj/Main.storyboard b/TaehyeonKim/BareBasic/BareBasic/Base.lproj/Main.storyboard new file mode 100644 index 0000000..6760d6c --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/BareBasic/BareBasic/Info.plist b/TaehyeonKim/BareBasic/BareBasic/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/BareBasic/BareBasic/ViewController.swift b/TaehyeonKim/BareBasic/BareBasic/ViewController.swift new file mode 100644 index 0000000..8310dce --- /dev/null +++ b/TaehyeonKim/BareBasic/BareBasic/ViewController.swift @@ -0,0 +1,25 @@ +// +// ViewController.swift +// BareBasic +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. 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/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.pbxproj b/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e7fcb6a --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.pbxproj @@ -0,0 +1,557 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + B0500D5A1FAC4714002E177E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D591FAC4714002E177E /* AppDelegate.swift */; }; + B0500D5C1FAC4714002E177E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D5B1FAC4714002E177E /* ViewController.swift */; }; + B0500D5F1FAC4714002E177E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D5D1FAC4714002E177E /* Main.storyboard */; }; + B0500D611FAC4714002E177E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0500D601FAC4714002E177E /* Assets.xcassets */; }; + B0500D641FAC4714002E177E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D621FAC4714002E177E /* LaunchScreen.storyboard */; }; + B0500D6F1FAC4714002E177E /* HelloiPhoneTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D6E1FAC4714002E177E /* HelloiPhoneTests.swift */; }; + B0500D7A1FAC4714002E177E /* HelloiPhoneUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D791FAC4714002E177E /* HelloiPhoneUITests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B0500D6B1FAC4714002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D4E1FAC4714002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D551FAC4714002E177E; + remoteInfo = HelloiPhone; + }; + B0500D761FAC4714002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D4E1FAC4714002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D551FAC4714002E177E; + remoteInfo = HelloiPhone; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + B0500D561FAC4714002E177E /* HelloiPhone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloiPhone.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D591FAC4714002E177E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B0500D5B1FAC4714002E177E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + B0500D5E1FAC4714002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B0500D601FAC4714002E177E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B0500D631FAC4714002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B0500D651FAC4714002E177E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B0500D6A1FAC4714002E177E /* HelloiPhoneTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloiPhoneTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D6E1FAC4714002E177E /* HelloiPhoneTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelloiPhoneTests.swift; sourceTree = ""; }; + B0500D701FAC4714002E177E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B0500D751FAC4714002E177E /* HelloiPhoneUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloiPhoneUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D791FAC4714002E177E /* HelloiPhoneUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelloiPhoneUITests.swift; sourceTree = ""; }; + B0500D7B1FAC4714002E177E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B0500D531FAC4714002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D671FAC4714002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D721FAC4714002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B0500D4D1FAC4714002E177E = { + isa = PBXGroup; + children = ( + B0500D581FAC4714002E177E /* HelloiPhone */, + B0500D6D1FAC4714002E177E /* HelloiPhoneTests */, + B0500D781FAC4714002E177E /* HelloiPhoneUITests */, + B0500D571FAC4714002E177E /* Products */, + ); + sourceTree = ""; + }; + B0500D571FAC4714002E177E /* Products */ = { + isa = PBXGroup; + children = ( + B0500D561FAC4714002E177E /* HelloiPhone.app */, + B0500D6A1FAC4714002E177E /* HelloiPhoneTests.xctest */, + B0500D751FAC4714002E177E /* HelloiPhoneUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B0500D581FAC4714002E177E /* HelloiPhone */ = { + isa = PBXGroup; + children = ( + B0500D591FAC4714002E177E /* AppDelegate.swift */, + B0500D5B1FAC4714002E177E /* ViewController.swift */, + B0500D5D1FAC4714002E177E /* Main.storyboard */, + B0500D601FAC4714002E177E /* Assets.xcassets */, + B0500D621FAC4714002E177E /* LaunchScreen.storyboard */, + B0500D651FAC4714002E177E /* Info.plist */, + ); + path = HelloiPhone; + sourceTree = ""; + }; + B0500D6D1FAC4714002E177E /* HelloiPhoneTests */ = { + isa = PBXGroup; + children = ( + B0500D6E1FAC4714002E177E /* HelloiPhoneTests.swift */, + B0500D701FAC4714002E177E /* Info.plist */, + ); + path = HelloiPhoneTests; + sourceTree = ""; + }; + B0500D781FAC4714002E177E /* HelloiPhoneUITests */ = { + isa = PBXGroup; + children = ( + B0500D791FAC4714002E177E /* HelloiPhoneUITests.swift */, + B0500D7B1FAC4714002E177E /* Info.plist */, + ); + path = HelloiPhoneUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B0500D551FAC4714002E177E /* HelloiPhone */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D7E1FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhone" */; + buildPhases = ( + B0500D521FAC4714002E177E /* Sources */, + B0500D531FAC4714002E177E /* Frameworks */, + B0500D541FAC4714002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HelloiPhone; + productName = HelloiPhone; + productReference = B0500D561FAC4714002E177E /* HelloiPhone.app */; + productType = "com.apple.product-type.application"; + }; + B0500D691FAC4714002E177E /* HelloiPhoneTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D811FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhoneTests" */; + buildPhases = ( + B0500D661FAC4714002E177E /* Sources */, + B0500D671FAC4714002E177E /* Frameworks */, + B0500D681FAC4714002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500D6C1FAC4714002E177E /* PBXTargetDependency */, + ); + name = HelloiPhoneTests; + productName = HelloiPhoneTests; + productReference = B0500D6A1FAC4714002E177E /* HelloiPhoneTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B0500D741FAC4714002E177E /* HelloiPhoneUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500D841FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhoneUITests" */; + buildPhases = ( + B0500D711FAC4714002E177E /* Sources */, + B0500D721FAC4714002E177E /* Frameworks */, + B0500D731FAC4714002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500D771FAC4714002E177E /* PBXTargetDependency */, + ); + name = HelloiPhoneUITests; + productName = HelloiPhoneUITests; + productReference = B0500D751FAC4714002E177E /* HelloiPhoneUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B0500D4E1FAC4714002E177E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Taehyeon Kim"; + TargetAttributes = { + B0500D551FAC4714002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + }; + B0500D691FAC4714002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D551FAC4714002E177E; + }; + B0500D741FAC4714002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D551FAC4714002E177E; + }; + }; + }; + buildConfigurationList = B0500D511FAC4714002E177E /* Build configuration list for PBXProject "HelloiPhone" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B0500D4D1FAC4714002E177E; + productRefGroup = B0500D571FAC4714002E177E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B0500D551FAC4714002E177E /* HelloiPhone */, + B0500D691FAC4714002E177E /* HelloiPhoneTests */, + B0500D741FAC4714002E177E /* HelloiPhoneUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B0500D541FAC4714002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D641FAC4714002E177E /* LaunchScreen.storyboard in Resources */, + B0500D611FAC4714002E177E /* Assets.xcassets in Resources */, + B0500D5F1FAC4714002E177E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D681FAC4714002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D731FAC4714002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B0500D521FAC4714002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D5C1FAC4714002E177E /* ViewController.swift in Sources */, + B0500D5A1FAC4714002E177E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D661FAC4714002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D6F1FAC4714002E177E /* HelloiPhoneTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500D711FAC4714002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D7A1FAC4714002E177E /* HelloiPhoneUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B0500D6C1FAC4714002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D551FAC4714002E177E /* HelloiPhone */; + targetProxy = B0500D6B1FAC4714002E177E /* PBXContainerItemProxy */; + }; + B0500D771FAC4714002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D551FAC4714002E177E /* HelloiPhone */; + targetProxy = B0500D761FAC4714002E177E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + B0500D5D1FAC4714002E177E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D5E1FAC4714002E177E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B0500D621FAC4714002E177E /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D631FAC4714002E177E /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B0500D7C1FAC4714002E177E /* 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; + }; + B0500D7D1FAC4714002E177E /* 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; + }; + B0500D7F1FAC4714002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhone/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhone"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B0500D801FAC4714002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhone/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhone"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + B0500D821FAC4714002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhoneTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhoneTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloiPhone.app/HelloiPhone"; + }; + name = Debug; + }; + B0500D831FAC4714002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhoneTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhoneTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloiPhone.app/HelloiPhone"; + }; + name = Release; + }; + B0500D851FAC4714002E177E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhoneUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhoneUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = HelloiPhone; + }; + name = Debug; + }; + B0500D861FAC4714002E177E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HelloiPhoneUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Taehyeon-Kim.HelloiPhoneUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = HelloiPhone; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B0500D511FAC4714002E177E /* Build configuration list for PBXProject "HelloiPhone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D7C1FAC4714002E177E /* Debug */, + B0500D7D1FAC4714002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D7E1FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D7F1FAC4714002E177E /* Debug */, + B0500D801FAC4714002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D811FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhoneTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D821FAC4714002E177E /* Debug */, + B0500D831FAC4714002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500D841FAC4714002E177E /* Build configuration list for PBXNativeTarget "HelloiPhoneUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500D851FAC4714002E177E /* Debug */, + B0500D861FAC4714002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B0500D4E1FAC4714002E177E /* Project object */; +} diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ca797d8 --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/AppDelegate.swift b/TaehyeonKim/HelloiPhone/HelloiPhone/AppDelegate.swift new file mode 100644 index 0000000..b462e16 --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// HelloiPhone +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + 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 invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + 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 active state; here you can undo many of the changes made on entering the background. + } + + 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) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/HelloiPhone/HelloiPhone/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1d060ed --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/Main.storyboard b/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/Main.storyboard new file mode 100644 index 0000000..a461c90 --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/Base.lproj/Main.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/Info.plist b/TaehyeonKim/HelloiPhone/HelloiPhone/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/HelloiPhone/HelloiPhone/ViewController.swift b/TaehyeonKim/HelloiPhone/HelloiPhone/ViewController.swift new file mode 100644 index 0000000..698ebae --- /dev/null +++ b/TaehyeonKim/HelloiPhone/HelloiPhone/ViewController.swift @@ -0,0 +1,29 @@ +// +// ViewController.swift +// HelloiPhone +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + @IBOutlet weak var myLabel: UILabel! + 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. + } + + @IBAction func change(_ sender: Any) { + myLabel.text = "Hello iPhone" + } + +} + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj b/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9d686db --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj @@ -0,0 +1,329 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + B01623201FAD80A8001FA355 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B016231F1FAD80A8001FA355 /* AppDelegate.swift */; }; + B01623221FAD80A8001FA355 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01623211FAD80A8001FA355 /* ViewController.swift */; }; + B01623251FAD80A8001FA355 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B01623231FAD80A8001FA355 /* Main.storyboard */; }; + B01623271FAD80A8001FA355 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B01623261FAD80A8001FA355 /* Assets.xcassets */; }; + B016232A1FAD80A8001FA355 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B01623281FAD80A8001FA355 /* LaunchScreen.storyboard */; }; + B01623321FAD8140001FA355 /* MeetingRoomListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01623311FAD8140001FA355 /* MeetingRoomListViewController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B016231C1FAD80A8001FA355 /* MeetingRooms.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetingRooms.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B016231F1FAD80A8001FA355 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B01623211FAD80A8001FA355 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + B01623241FAD80A8001FA355 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B01623261FAD80A8001FA355 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B01623291FAD80A8001FA355 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B016232B1FAD80A8001FA355 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B01623311FAD8140001FA355 /* MeetingRoomListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRoomListViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B01623191FAD80A8001FA355 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B01623131FAD80A8001FA355 = { + isa = PBXGroup; + children = ( + B016231E1FAD80A8001FA355 /* MeetingRooms */, + B016231D1FAD80A8001FA355 /* Products */, + ); + sourceTree = ""; + }; + B016231D1FAD80A8001FA355 /* Products */ = { + isa = PBXGroup; + children = ( + B016231C1FAD80A8001FA355 /* MeetingRooms.app */, + ); + name = Products; + sourceTree = ""; + }; + B016231E1FAD80A8001FA355 /* MeetingRooms */ = { + isa = PBXGroup; + children = ( + B016231F1FAD80A8001FA355 /* AppDelegate.swift */, + B01623211FAD80A8001FA355 /* ViewController.swift */, + B01623231FAD80A8001FA355 /* Main.storyboard */, + B01623311FAD8140001FA355 /* MeetingRoomListViewController.swift */, + B01623261FAD80A8001FA355 /* Assets.xcassets */, + B01623281FAD80A8001FA355 /* LaunchScreen.storyboard */, + B016232B1FAD80A8001FA355 /* Info.plist */, + ); + path = MeetingRooms; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B016231B1FAD80A8001FA355 /* MeetingRooms */ = { + isa = PBXNativeTarget; + buildConfigurationList = B016232E1FAD80A8001FA355 /* Build configuration list for PBXNativeTarget "MeetingRooms" */; + buildPhases = ( + B01623181FAD80A8001FA355 /* Sources */, + B01623191FAD80A8001FA355 /* Frameworks */, + B016231A1FAD80A8001FA355 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MeetingRooms; + productName = MeetingRooms; + productReference = B016231C1FAD80A8001FA355 /* MeetingRooms.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B01623141FAD80A8001FA355 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Taehyeon Kim"; + TargetAttributes = { + B016231B1FAD80A8001FA355 = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = B01623171FAD80A8001FA355 /* Build configuration list for PBXProject "MeetingRooms" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B01623131FAD80A8001FA355; + productRefGroup = B016231D1FAD80A8001FA355 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B016231B1FAD80A8001FA355 /* MeetingRooms */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B016231A1FAD80A8001FA355 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B016232A1FAD80A8001FA355 /* LaunchScreen.storyboard in Resources */, + B01623271FAD80A8001FA355 /* Assets.xcassets in Resources */, + B01623251FAD80A8001FA355 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B01623181FAD80A8001FA355 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B01623221FAD80A8001FA355 /* ViewController.swift in Sources */, + B01623201FAD80A8001FA355 /* AppDelegate.swift in Sources */, + B01623321FAD8140001FA355 /* MeetingRoomListViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + B01623231FAD80A8001FA355 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B01623241FAD80A8001FA355 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B01623281FAD80A8001FA355 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B01623291FAD80A8001FA355 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B016232C1FAD80A8001FA355 /* 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; + }; + B016232D1FAD80A8001FA355 /* 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; + }; + B016232F1FAD80A8001FA355 /* 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 = "Taehyeon-Kim.MeetingRooms"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B01623301FAD80A8001FA355 /* 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 = "Taehyeon-Kim.MeetingRooms"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B01623171FAD80A8001FA355 /* Build configuration list for PBXProject "MeetingRooms" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B016232C1FAD80A8001FA355 /* Debug */, + B016232D1FAD80A8001FA355 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B016232E1FAD80A8001FA355 /* Build configuration list for PBXNativeTarget "MeetingRooms" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B016232F1FAD80A8001FA355 /* Debug */, + B01623301FAD80A8001FA355 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B01623141FAD80A8001FA355 /* Project object */; +} diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ff41f19 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/AppDelegate.swift b/TaehyeonKim/MeetingRooms/MeetingRooms/AppDelegate.swift new file mode 100644 index 0000000..26abc78 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// MeetingRooms +// +// Created by Taehyeon Kim on 2017. 11. 4.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + 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 invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + 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 active state; here you can undo many of the changes made on entering the background. + } + + 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) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard b/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard new file mode 100644 index 0000000..71f4da0 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/Info.plist b/TaehyeonKim/MeetingRooms/MeetingRooms/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/MeetingRooms/MeetingRooms/MeetingRoomListViewController.swift b/TaehyeonKim/MeetingRooms/MeetingRooms/MeetingRoomListViewController.swift new file mode 100644 index 0000000..2876359 --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/MeetingRoomListViewController.swift @@ -0,0 +1,123 @@ +// +// MeetingRoomListViewController.swift +// MeetingRooms +// +// Created by Taehyeon Kim on 2017. 11. 4.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +class MeetingRoomListViewController: UITableViewController { + + var meetingRooms:[String:[String:Int]] = ["Meeting":["Banksy":4, "Rivera":8, "Kahlo":8, "Picasso":10], "Seminar":["Cezanne":20, "Matisse":30, "Reonir":40]] + func meetingRoomsAtIndex(index:Int) -> (key:String, value:[String: Int]) { + let orderedMeetingRooms = meetingRooms.sorted(by:{$0.1.first!.1 < $1.1.first!.1}) + return orderedMeetingRooms[index] + } + 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 numberOfSections(in 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 rowCount = meetingRoomsAtIndex(index:section).value.count + return rowCount + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell", for: indexPath) + + + //let categoryValue = Array(meetingRooms.values)[indexPath.section] + let categoryValue = meetingRoomsAtIndex(index:indexPath.section).value + let orderedCategoryValue = categoryValue.sorted(by:{$0.1 < $1.1}) + + let roomName = orderedCategoryValue[indexPath.row].0 + let capacity = orderedCategoryValue[indexPath.row].1 + + cell.textLabel!.text = roomName + cell.detailTextLabel!.text = "\(capacity)" + + return cell + } + + override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { + //let orderedMeetingRooms = meetingRooms.sorted(by:{$0.1.first!.1 < $1.1.first!.1}) + return meetingRoomsAtIndex(index:section).key + } + + override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? { + //let orderedMeetingRooms = meetingRooms.sorted(by:{$0.1.first!.1 < $1.1.first!.1}) + + let rowCount = meetingRoomsAtIndex(index:section).value.count + return "\(rowCount) rooms" + } + + /* + // 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/TaehyeonKim/MeetingRooms/MeetingRooms/ViewController.swift b/TaehyeonKim/MeetingRooms/MeetingRooms/ViewController.swift new file mode 100644 index 0000000..08261fb --- /dev/null +++ b/TaehyeonKim/MeetingRooms/MeetingRooms/ViewController.swift @@ -0,0 +1,25 @@ +// +// ViewController.swift +// MeetingRooms +// +// Created by Taehyeon Kim on 2017. 11. 4.. +// Copyright © 2017년 Taehyeon Kim. 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/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a2255b3 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.pbxproj @@ -0,0 +1,332 @@ +// !$*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)"; + SWIFT_VERSION = 4.0; + }; + 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)"; + SWIFT_VERSION = 4.0; + }; + 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/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift new file mode 100644 index 0000000..d510ea8 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/AppDelegate.swift @@ -0,0 +1,55 @@ +// +// AppDelegate.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 3. 13.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + return true + } + + 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. + } + + 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 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 = UserDefaults.standard.integer(forKey: TintColorKey) + guard let defaultColor = TintColor(rawValue: userDefaultColor)?.color else { + return + } + applyTintColor(color: defaultColor) + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + dataCenter.save() + } + + +} + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..eeea76c --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/Contents.json b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/Contents.json new file mode 100644 index 0000000..bf9fa3c --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "building_tab.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/building_tab.png b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/building_tab.png new file mode 100644 index 0000000..b8bb3f1 Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/building_tab.imageset/building_tab.png differ diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/Contents.json b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/Contents.json new file mode 100644 index 0000000..31ee980 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "equipment_tab.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/equipment_tab.png b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/equipment_tab.png new file mode 100644 index 0000000..a5ae185 Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/equipment_tab.imageset/equipment_tab.png differ diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/Contents.json b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/Contents.json new file mode 100644 index 0000000..73c4fdb --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "location.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/location.png b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/location.png new file mode 100644 index 0000000..064332f Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Assets.xcassets/location.imageset/location.png differ diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard new file mode 100644 index 0000000..afabd6b --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Base.lproj/Main.storyboard @@ -0,0 +1,792 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift new file mode 100644 index 0000000..7e96dbf --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/BranchListViewController.swift @@ -0,0 +1,72 @@ +// +// 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 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 as 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 prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "ServiceSegue" { + guard let destination = segue.destination as? ServiceListViewController, let selectedIndex = self.tableView.indexPathForSelectedRow?.row else { + return + } + destination.branch = dataCenter.branches[selectedIndex] as Branch + } + } + @IBAction func locationTurnOn(_: 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) + } +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift new file mode 100644 index 0000000..bbea1fe --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/DataCenter.swift @@ -0,0 +1,165 @@ +// +// DataCenter.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 4. 5.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import Foundation + +let dataCenter:DataCenter = DataCenter() +let fileName = "BranchData.brch" + +class DataCenter { + var branches:[Branch] = [] + + var filePath:String { get{ + let documentDirectory = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! + return documentDirectory + fileName + }} + + init() { + if FileManager.default.fileExists(atPath: self.filePath) { + //read + if let unarchArray = NSKeyedUnarchiver.unarchiveObject(withFile: self.filePath) as? [Branch] { + branches += unarchArray + } + } else { + //create + branches += defaultData() + } + + + } + + func defaultData() -> Array { + 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] + + let pangyoBranch = Branch(name: "판교점") + let samsungBranch = Branch(name: "삼성점") + let yeoksamBranch = Branch(name: "역삼점") + let sinrimBranch = Branch(name: "신림점") + let songdoBranch = Branch(name: "송도점") + let anamBranch = Branch(name: "안암점") + pangyoBranch.services = [vehicleService, meetingRoomService, visitorService, deskService] + + let branchArray = [samsungBranch, pangyoBranch, yeoksamBranch, sinrimBranch, songdoBranch, anamBranch] + return branchArray + } + + func save(){ + NSKeyedArchiver.archiveRootObject(self.branches, toFile: self.filePath) + } +} + + +class Branch:NSObject, NSCoding { + let name:String + var services:[Service]? + + init(name:String) { + self.name = name + } + + required init?(coder aDecoder: NSCoder) { + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.services = aDecoder.decodeObject(forKey: "services") as? [Service] + } + + 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]? + + init (name:String){ + self.name = name + } + + required init?(coder aDecoder: NSCoder) { + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.item = aDecoder.decodeObject(forKey: "item") as? [MeetingRoom] + } + + func encode(with aCoder: NSCoder) { + aCoder.encode(self.name, forKey: "name") + aCoder.encode(self.item, forKey: "item") + } + +} + + +class MeetingRoom:NSObject, NSCoding { + let name:String + let capacity:Int + var reservations:[Reservation]? + + init(name:String, capacity:Int) { + self.name = name + self.capacity = capacity + } + + required init?(coder aDecoder: NSCoder) { + self.name = aDecoder.decodeObject(forKey: "name") as! String + self.capacity = aDecoder.decodeInteger(forKey: "capacity") + self.reservations = aDecoder.decodeObject(forKey: "reservations") as? [Reservation] + } + + 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 + var attendees:Int + var equipments:[String] + var catering:Bool + + override init() { + self.hostName = "Host of meeting" + self.date = NSDate() + self.attendees = 1 + self.equipments = [] + self.catering = false + } + + + required init?(coder aDecoder: NSCoder) { + 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 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/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist new file mode 100644 index 0000000..5962ab0 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsDefault.plist @@ -0,0 +1,30 @@ + + + + + + name + HP G2020T + amount + 15 + + + name + Lenovo P900TW + amount + 10 + + + name + HP DL320e + amount + 7 + + + name + TYAN KST208 + amount + 20 + + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift new file mode 100644 index 0000000..1591b8e --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/EquipmentsListViewController.swift @@ -0,0 +1,115 @@ +// +// EquipmentsListViewController.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 4. 20.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import UIKit + +let EquipmentFileName = "EquipmentsDefault" +class EquipmentsListViewController: UITableViewController { + + var equipments:Array = [] + + 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() + + guard let equipmentURL = Bundle.main.url(forResource: EquipmentFileName, withExtension: "plist") else { + print("No File") + return + } + if let equipmentsArray = NSArray(contentsOf: equipmentURL){ + print(equipmentsArray) + equipments += Array(equipmentsArray) + } + + } + + 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 { + // #warning Incomplete implementation, return the number of rows + return equipments.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "EquipmentCell", for: indexPath as IndexPath) + + guard let equipment = equipments[indexPath.row] as? [String:AnyObject] else { + return cell + } + + if let name = equipment["name"] as? String { + cell.textLabel?.text = name + } + if let amount = equipment["amount"] as? Int { + cell.detailTextLabel?.text = String(amount) + } + + 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?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift new file mode 100644 index 0000000..ca6fb11 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/MeetingRoomsListController.swift @@ -0,0 +1,179 @@ +// +// 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 numberOfSections(in 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, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ItemCell", for: 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 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?.item?[selectedIndex] else { + return + } + destination.meetingRoom = meetingRoom + } + } +} + + diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift new file mode 100644 index 0000000..ca642eb --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReservationListViewController.swift @@ -0,0 +1,116 @@ +// +// ReservationListViewController.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 4. 17.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import UIKit + +class ReservationListViewController: UITableViewController { + + var meetingRoom:MeetingRoom? + var newReservation:Reservation? + + 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 addNewItem(reservation:Reservation) { + if (self.meetingRoom?.reservations?.append(reservation)) == nil { + self.meetingRoom?.reservations = [reservation] + } + dataCenter.save() + + self.tableView.reloadData() + + } + + @IBAction func unwindToReserveList(_:UIStoryboardSegue) { + print("unwind") + } + + // 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 = meetingRoom?.reservations?.count else { + return 0 + } + return rowCount + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ReservationCell", for: indexPath as 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 { + // 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. + } + */ + +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift new file mode 100644 index 0000000..9c9e254 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ReserveRoomViewController.swift @@ -0,0 +1,162 @@ +// +// 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(_: Any) { + guard let reservation = makeReservation() else { + self.dismiss(animated: true, completion: { + }) + return + } + + switch self.presentingViewController { + case let tabBarC as UITabBarController: + if let navigationC = tabBarC.selectedViewController as? UINavigationController, let reservationListVC = navigationC.topViewController as? ReservationListViewController { + reservationListVC.addNewItem(reservation: reservation) + } + case let navigationC as UINavigationController: + if let reservationListVC = navigationC.topViewController as? ReservationListViewController { + reservationListVC.addNewItem(reservation: reservation) + } + case let reservationListVC as ReservationListViewController: + reservationListVC.addNewItem(reservation: reservation) + default: + print("Cannot find ReservationListViewController") + break + } + + self.dismiss(animated: true, completion: { + }) + + } + + + @IBAction func cancelReservation(_: Any) { + self.dismiss(animated: 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 prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "ReserveDone" { + guard let newReservation = makeReservation(), let reservationListVC = segue.destination as? ReservationListViewController else { + return + } + reservationListVC.addNewItem(reservation: newReservation) + } + } + + func makeReservation() -> Reservation? { + let newReservation = Reservation() + let host = hostNameField.text! + if host.isEmpty { + return nil + } + newReservation.hostName = host + newReservation.date = datePicker.date as NSDate + if let equipmentArray = equipmentsField.text?.characters.split(separator: ",").map(String.init) { + newReservation.equipments = equipmentArray + } + newReservation.catering = cateringSwitch.isOn + return newReservation + } +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift new file mode 100644 index 0000000..9ff9156 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/RoomInfoViewController.swift @@ -0,0 +1,100 @@ +// +// RoomInfoViewController.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 4. 16.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import UIKit + +class RoomInfoViewController: 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() + } + + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + @IBAction func dismissModal(_: Any) { + self.dismiss(animated: 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?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift new file mode 100644 index 0000000..64875aa --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/ServiceListViewController.swift @@ -0,0 +1,49 @@ +// +// 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 numberOfSections(in 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, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "ServiceCell", for: indexPath as IndexPath) + + guard let service = branch?.services?[indexPath.row] else { + return cell + } + cell.textLabel?.text = service.name + return cell + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "MeetingRoomSegue" { + guard let destination = segue.destination as? MeetingRoomsListController, let selectedIndex = self.tableView.indexPathForSelectedRow?.row , let service = branch?.services?[selectedIndex] else { + return + } + destination.service = service + } + } +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift new file mode 100644 index 0000000..f62823d --- /dev/null +++ b/TaehyeonKim/MeetingRoomsDynamic/MeetingRoomsDynamic/TintColorViewController.swift @@ -0,0 +1,75 @@ +// +// TintColorViewController.swift +// MeetingRoomsDynamic +// +// Created by Lingostar on 2016. 4. 20.. +// Copyright © 2016년 CodersHigh. All rights reserved. +// + +import UIKit + +enum TintColor:Int { + case Blue=0, Red, Green, Purple + + var color:UIColor {get{ + switch self { + case .Blue: + return UIColor.blue + case .Red: + return UIColor.red + case .Green: + return UIColor.green + case .Purple: + return UIColor.purple + } + }} +} +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! + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + + let userDefaultColor = UserDefaults.standard.integer(forKey: TintColorKey) + self.tintColorSegment.selectedSegmentIndex = userDefaultColor + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + @IBAction func tintColorChanged(_: Any) { + let selectedIndex = self.tintColorSegment.selectedSegmentIndex + UserDefaults.standard.set(selectedIndex, forKey: TintColorKey) + guard let changedColor = TintColor(rawValue: selectedIndex)?.color else { + return + } + applyTintColor(color: 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?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/TaehyeonKim/MeetingRoomsDynamic/building.png b/TaehyeonKim/MeetingRoomsDynamic/building.png new file mode 100644 index 0000000..6b1aec0 Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/building.png differ diff --git a/TaehyeonKim/MeetingRoomsDynamic/equipment.png b/TaehyeonKim/MeetingRoomsDynamic/equipment.png new file mode 100644 index 0000000..b9132b8 Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/equipment.png differ diff --git a/TaehyeonKim/MeetingRoomsDynamic/location.png b/TaehyeonKim/MeetingRoomsDynamic/location.png new file mode 100644 index 0000000..064332f Binary files /dev/null and b/TaehyeonKim/MeetingRoomsDynamic/location.png differ diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj new file mode 100644 index 0000000..124439d --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.pbxproj @@ -0,0 +1,296 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 */; }; +/* End PBXBuildFile 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2C6EF08F1C2AB6D7002398BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2C6EF0891C2AB6D7002398BD = { + isa = PBXGroup; + children = ( + 2C6EF0941C2AB6D7002398BD /* MeetingRooms */, + 2C6EF0931C2AB6D7002398BD /* Products */, + ); + sourceTree = ""; + }; + 2C6EF0931C2AB6D7002398BD /* Products */ = { + isa = PBXGroup; + children = ( + 2C6EF0921C2AB6D7002398BD /* MeetingRooms.app */, + ); + name = Products; + sourceTree = ""; + }; + 2C6EF0941C2AB6D7002398BD /* MeetingRooms */ = { + isa = PBXGroup; + children = ( + 2C6EF0951C2AB6D8002398BD /* AppDelegate.swift */, + 2C6EF0971C2AB6D8002398BD /* ViewController.swift */, + 2C6EF0991C2AB6D8002398BD /* Main.storyboard */, + 2C6EF09C1C2AB6D8002398BD /* Assets.xcassets */, + 2C6EF09E1C2AB6D8002398BD /* LaunchScreen.storyboard */, + 2C6EF0A11C2AB6D8002398BD /* Info.plist */, + ); + path = MeetingRooms; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2C6EF0911C2AB6D7002398BD /* MeetingRooms */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2C6EF0A41C2AB6D8002398BD /* Build configuration list for PBXNativeTarget "MeetingRooms" */; + buildPhases = ( + 2C6EF08E1C2AB6D7002398BD /* Sources */, + 2C6EF08F1C2AB6D7002398BD /* Frameworks */, + 2C6EF0901C2AB6D7002398BD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MeetingRooms; + productName = MeetingRooms; + productReference = 2C6EF0921C2AB6D7002398BD /* MeetingRooms.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2C6EF08A1C2AB6D7002398BD /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0710; + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = CodersHigh; + TargetAttributes = { + 2C6EF0911C2AB6D7002398BD = { + CreatedOnToolsVersion = 7.1; + }; + }; + }; + buildConfigurationList = 2C6EF08D1C2AB6D7002398BD /* Build configuration list for PBXProject "MeetingRooms" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2C6EF0891C2AB6D7002398BD; + productRefGroup = 2C6EF0931C2AB6D7002398BD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2C6EF0911C2AB6D7002398BD /* MeetingRooms */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2C6EF0901C2AB6D7002398BD /* 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 */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C6EF0981C2AB6D8002398BD /* ViewController.swift in Sources */, + 2C6EF0961C2AB6D8002398BD /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2C6EF0991C2AB6D8002398BD /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2C6EF09A1C2AB6D8002398BD /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 2C6EF09E1C2AB6D8002398BD /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2C6EF09F1C2AB6D8002398BD /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 2C6EF0A21C2AB6D8002398BD /* 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; + }; + 2C6EF0A31C2AB6D8002398BD /* 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; + }; + 2C6EF0A51C2AB6D8002398BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MeetingRooms/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRooms; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + 2C6EF0A61C2AB6D8002398BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MeetingRooms/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.codershigh.MeetingRooms; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2C6EF08D1C2AB6D7002398BD /* Build configuration list for PBXProject "MeetingRooms" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2C6EF0A21C2AB6D8002398BD /* Debug */, + 2C6EF0A31C2AB6D8002398BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2C6EF0A41C2AB6D8002398BD /* Build configuration list for PBXNativeTarget "MeetingRooms" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2C6EF0A51C2AB6D8002398BD /* Debug */, + 2C6EF0A61C2AB6D8002398BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2C6EF08A1C2AB6D7002398BD /* Project object */; +} diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/AppDelegate.swift b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/AppDelegate.swift new file mode 100644 index 0000000..4feb190 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// MeetingRooms +// +// Created by Lingostar on 2015. 12. 23.. +// Copyright © 2015년 CodersHigh. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + 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. + } + + 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 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) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg new file mode 100644 index 0000000..829e21b Binary files /dev/null and b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/4347286612_11577182f1_o.jpg differ diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json new file mode 100644 index 0000000..b0283d5 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/4347286612_11577182f1_o.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "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/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/Contents.json b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard new file mode 100644 index 0000000..eae1517 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Base.lproj/Main.storyboard @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Info.plist b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/ViewController.swift b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/ViewController.swift new file mode 100644 index 0000000..435714c --- /dev/null +++ b/TaehyeonKim/MeetingRoomsStatic/MeetingRooms/MeetingRooms/ViewController.swift @@ -0,0 +1,25 @@ +// +// ViewController.swift +// MeetingRooms +// +// Created by Lingostar on 2015. 12. 23.. +// Copyright © 2015년 CodersHigh. 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/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj b/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d99feb1 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.pbxproj @@ -0,0 +1,533 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + B0500D941FAC4A52002E177E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D931FAC4A52002E177E /* AppDelegate.swift */; }; + B0500D961FAC4A52002E177E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500D951FAC4A52002E177E /* ViewController.swift */; }; + B0500D991FAC4A52002E177E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D971FAC4A52002E177E /* Main.storyboard */; }; + B0500D9B1FAC4A52002E177E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0500D9A1FAC4A52002E177E /* Assets.xcassets */; }; + B0500D9E1FAC4A52002E177E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0500D9C1FAC4A52002E177E /* LaunchScreen.storyboard */; }; + B0500DC21FAC4FCB002E177E /* Money.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0500DC11FAC4FCB002E177E /* Money.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B0500DA51FAC4A53002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D881FAC4A52002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D8F1FAC4A52002E177E; + remoteInfo = MoneyConverter; + }; + B0500DB01FAC4A53002E177E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B0500D881FAC4A52002E177E /* Project object */; + proxyType = 1; + remoteGlobalIDString = B0500D8F1FAC4A52002E177E; + remoteInfo = MoneyConverter; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + B0500D901FAC4A52002E177E /* MoneyConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoneyConverter.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500D931FAC4A52002E177E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B0500D951FAC4A52002E177E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + B0500D981FAC4A52002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B0500D9A1FAC4A52002E177E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B0500D9D1FAC4A52002E177E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B0500D9F1FAC4A52002E177E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B0500DA41FAC4A53002E177E /* MoneyConverterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoneyConverterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500DAF1FAC4A53002E177E /* MoneyConverterUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoneyConverterUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B0500DC11FAC4FCB002E177E /* Money.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Money.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B0500D8D1FAC4A52002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DA11FAC4A53002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DAC1FAC4A53002E177E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B0500D871FAC4A52002E177E = { + isa = PBXGroup; + children = ( + B0500D921FAC4A52002E177E /* MoneyConverter */, + B0500D911FAC4A52002E177E /* Products */, + ); + sourceTree = ""; + }; + B0500D911FAC4A52002E177E /* Products */ = { + isa = PBXGroup; + children = ( + B0500D901FAC4A52002E177E /* MoneyConverter.app */, + B0500DA41FAC4A53002E177E /* MoneyConverterTests.xctest */, + B0500DAF1FAC4A53002E177E /* MoneyConverterUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B0500D921FAC4A52002E177E /* MoneyConverter */ = { + isa = PBXGroup; + children = ( + B0500D931FAC4A52002E177E /* AppDelegate.swift */, + B0500D951FAC4A52002E177E /* ViewController.swift */, + B0500D971FAC4A52002E177E /* Main.storyboard */, + B0500DC11FAC4FCB002E177E /* Money.swift */, + B0500D9A1FAC4A52002E177E /* Assets.xcassets */, + B0500D9C1FAC4A52002E177E /* LaunchScreen.storyboard */, + B0500D9F1FAC4A52002E177E /* Info.plist */, + ); + path = MoneyConverter; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B0500D8F1FAC4A52002E177E /* MoneyConverter */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500DB81FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverter" */; + buildPhases = ( + B0500D8C1FAC4A52002E177E /* Sources */, + B0500D8D1FAC4A52002E177E /* Frameworks */, + B0500D8E1FAC4A52002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MoneyConverter; + productName = MoneyConverter; + productReference = B0500D901FAC4A52002E177E /* MoneyConverter.app */; + productType = "com.apple.product-type.application"; + }; + B0500DA31FAC4A53002E177E /* MoneyConverterTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500DBB1FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverterTests" */; + buildPhases = ( + B0500DA01FAC4A53002E177E /* Sources */, + B0500DA11FAC4A53002E177E /* Frameworks */, + B0500DA21FAC4A53002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500DA61FAC4A53002E177E /* PBXTargetDependency */, + ); + name = MoneyConverterTests; + productName = MoneyConverterTests; + productReference = B0500DA41FAC4A53002E177E /* MoneyConverterTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B0500DAE1FAC4A53002E177E /* MoneyConverterUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B0500DBE1FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverterUITests" */; + buildPhases = ( + B0500DAB1FAC4A53002E177E /* Sources */, + B0500DAC1FAC4A53002E177E /* Frameworks */, + B0500DAD1FAC4A53002E177E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B0500DB11FAC4A53002E177E /* PBXTargetDependency */, + ); + name = MoneyConverterUITests; + productName = MoneyConverterUITests; + productReference = B0500DAF1FAC4A53002E177E /* MoneyConverterUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B0500D881FAC4A52002E177E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Taehyeon Kim"; + TargetAttributes = { + B0500D8F1FAC4A52002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + }; + B0500DA31FAC4A53002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D8F1FAC4A52002E177E; + }; + B0500DAE1FAC4A53002E177E = { + CreatedOnToolsVersion = 9.0.1; + ProvisioningStyle = Automatic; + TestTargetID = B0500D8F1FAC4A52002E177E; + }; + }; + }; + buildConfigurationList = B0500D8B1FAC4A52002E177E /* Build configuration list for PBXProject "MoneyConverter" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B0500D871FAC4A52002E177E; + productRefGroup = B0500D911FAC4A52002E177E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B0500D8F1FAC4A52002E177E /* MoneyConverter */, + B0500DA31FAC4A53002E177E /* MoneyConverterTests */, + B0500DAE1FAC4A53002E177E /* MoneyConverterUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B0500D8E1FAC4A52002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500D9E1FAC4A52002E177E /* LaunchScreen.storyboard in Resources */, + B0500D9B1FAC4A52002E177E /* Assets.xcassets in Resources */, + B0500D991FAC4A52002E177E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DA21FAC4A53002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DAD1FAC4A53002E177E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B0500D8C1FAC4A52002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0500DC21FAC4FCB002E177E /* Money.swift in Sources */, + B0500D961FAC4A52002E177E /* ViewController.swift in Sources */, + B0500D941FAC4A52002E177E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DA01FAC4A53002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0500DAB1FAC4A53002E177E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B0500DA61FAC4A53002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D8F1FAC4A52002E177E /* MoneyConverter */; + targetProxy = B0500DA51FAC4A53002E177E /* PBXContainerItemProxy */; + }; + B0500DB11FAC4A53002E177E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B0500D8F1FAC4A52002E177E /* MoneyConverter */; + targetProxy = B0500DB01FAC4A53002E177E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + B0500D971FAC4A52002E177E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D981FAC4A52002E177E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B0500D9C1FAC4A52002E177E /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B0500D9D1FAC4A52002E177E /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B0500DB61FAC4A53002E177E /* 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; + }; + B0500DB71FAC4A53002E177E /* 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; + }; + B0500DB91FAC4A53002E177E /* 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 = "Taehyeon-Kim.MoneyConverter"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B0500DBA1FAC4A53002E177E /* 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 = "Taehyeon-Kim.MoneyConverter"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + B0500DBC1FAC4A53002E177E /* 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 = "Taehyeon-Kim.MoneyConverterTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoneyConverter.app/MoneyConverter"; + }; + name = Debug; + }; + B0500DBD1FAC4A53002E177E /* 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 = "Taehyeon-Kim.MoneyConverterTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoneyConverter.app/MoneyConverter"; + }; + name = Release; + }; + B0500DBF1FAC4A53002E177E /* 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 = "Taehyeon-Kim.MoneyConverterUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MoneyConverter; + }; + name = Debug; + }; + B0500DC01FAC4A53002E177E /* 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 = "Taehyeon-Kim.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 */ + B0500D8B1FAC4A52002E177E /* Build configuration list for PBXProject "MoneyConverter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500DB61FAC4A53002E177E /* Debug */, + B0500DB71FAC4A53002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500DB81FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500DB91FAC4A53002E177E /* Debug */, + B0500DBA1FAC4A53002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500DBB1FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverterTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500DBC1FAC4A53002E177E /* Debug */, + B0500DBD1FAC4A53002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B0500DBE1FAC4A53002E177E /* Build configuration list for PBXNativeTarget "MoneyConverterUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B0500DBF1FAC4A53002E177E /* Debug */, + B0500DC01FAC4A53002E177E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B0500D881FAC4A52002E177E /* Project object */; +} diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5566428 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/AppDelegate.swift b/TaehyeonKim/MoneyConverter/MoneyConverter/AppDelegate.swift new file mode 100644 index 0000000..cea619b --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// MoneyConverter +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + 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 invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + 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 active state; here you can undo many of the changes made on entering the background. + } + + 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) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json b/TaehyeonKim/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard b/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard b/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard new file mode 100644 index 0000000..dde2d7d --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/Base.lproj/Main.storyboard @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/Info.plist b/TaehyeonKim/MoneyConverter/MoneyConverter/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/Money.swift b/TaehyeonKim/MoneyConverter/MoneyConverter/Money.swift new file mode 100644 index 0000000..b370266 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/Money.swift @@ -0,0 +1,62 @@ +// +// Money.swift +// MoneyConverter +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import Foundation + +enum Currency:Int { + case USD = 0, KRW, JPY, EUR + + var ratio:Double { + get{ + switch self{ + case .USD: + return 1.0 + case .KRW: + return 1178.5 + case .JPY: + return 122.45 + case .EUR: + return 0.92 + } + } + } + + var symbol:String { + get{ + switch self{ + case .USD: + return "$" + case .KRW: + return "₩" + case .JPY: + return "¥" + case .EUR: + return "€" + } + } + } +} + +struct Money { + var usdollar = 0.0 + + init (_ _usdollar:Double) { + usdollar = _usdollar + } + + init (_ amount:Double, currency:Currency) { + usdollar = amount / currency.ratio + } + + func valueInCurrency(currency:Currency) -> String { + return "\(currency.symbol)" + "\(usdollar * currency.ratio)" + } +} + +let myMoney = Money(120) +let incomeInKRW = Money(350_000, currency:.KRW) diff --git a/TaehyeonKim/MoneyConverter/MoneyConverter/ViewController.swift b/TaehyeonKim/MoneyConverter/MoneyConverter/ViewController.swift new file mode 100644 index 0000000..40908a7 --- /dev/null +++ b/TaehyeonKim/MoneyConverter/MoneyConverter/ViewController.swift @@ -0,0 +1,51 @@ +// +// ViewController.swift +// MoneyConverter +// +// Created by Taehyeon Kim on 2017. 11. 3.. +// Copyright © 2017년 Taehyeon Kim. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + + @IBOutlet weak var currencySegment: UISegmentedControl! + @IBOutlet weak var sourceMoneyField: UITextField! + @IBOutlet weak var targetMoneyLabel: UILabel! + 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. + } + + @IBAction func convertMoney(_ sender: Any) { + guard let sourceCurrency = Currency(rawValue: currencySegment.selectedSegmentIndex) else { + print("Source Currency Error") + return + } + + guard let sourceAmount = Double(sourceMoneyField.text!) else { + targetMoneyLabel.text = "Error" + return + } + + let sourceMoney = Money(sourceAmount, currency:sourceCurrency) + + var targetMoneyString = "" + + for i in 0...3 { + targetMoneyString += sourceMoney.valueInCurrency(currency:Currency.init(rawValue:i)!) + targetMoneyString += "\n" + } + + targetMoneyLabel.text = targetMoneyString + } + +} + diff --git a/TaehyeonKim/README.text b/TaehyeonKim/README.text new file mode 100644 index 0000000..782f95a --- /dev/null +++ b/TaehyeonKim/README.text @@ -0,0 +1,12 @@ +README.txt + +2011-12186 +김태현 +Assignment : Programmers 동영상 수료 / 예제 제출 + +파일설명 +폴더명 TaehyeonKim +MeetingRoomsStatic, MeetingRoomsDynamic : 원본 SampleCodes에 있던 프로젝트를 수정한 것 +그 외 : 새로운 프로젝트 생성하여, 이름만 같게 하고 영상을 보며 직접 절차대로 진행한 것. +**MeetingRoomsStatic : 원본MeetingRooms 프로젝트 +**MeetingRooms : 원본MeetingRooms 프로젝트를 열어보니 간단한 스태틱페이지라, 그 이전까지 수료했던 과정과는 달라서 임의로 하나 추가. Dynamic이 아닌 버전. diff --git a/TaehyeonKim/SwiftFunctionType.playground/Contents.swift b/TaehyeonKim/SwiftFunctionType.playground/Contents.swift new file mode 100644 index 0000000..624c199 --- /dev/null +++ b/TaehyeonKim/SwiftFunctionType.playground/Contents.swift @@ -0,0 +1,182 @@ +//: Playground - noun: a place where people can play + + + +//: Session 5-1 Function Types + +func addVAT(source:Double) -> Double { + return source * 1.1 +} + +func couponDiscount(source:Double) -> Double { + return source * 0.9 +} + + +var additional:(Double) -> Double + +let transcation3219 = 120.7 +additional = addVAT + +let price3219 = additional(transcation3219) + +func finalPrice(source:Double, additional:(Double) -> Double) -> Double { + + let price = additional(source) + + return price +} + +let price3220 = finalPrice(source: 350.0, additional: couponDiscount) + + +//: Session 5-2 Closure + +let addVATClosure = { (source:Double) -> Double in + return source * 1.1 +} +let addVATClosure2 = { source in + return source * 1.1 +} +let addVATClosure3 = { source in + source * 1.1 +} +let addVATClosure4 = { $0 * 1.1 } + +let couponDiscountClosure = { (source:Double) -> Double in + return source * 0.9 +} +let couponDiscountClosure2 = { source in + return source * 0.9 +} +let couponDiscountClosure3 = { source in + source * 0.9 +} +let couponDiscountClosure4 = { $0 * 0.9 } + +let price3221 = addVATClosure4(157.6) + + +func makeAdder (x:Int) -> (Int) -> Int { + func adder(a:Int) -> Int { + return x+a + } + return adder +} + +func makeAdder2(x:Int) -> (Int) -> Int { + let adder:(Int) -> Int = { + return $0 + x + } + return adder +} + +func makeAdder3(x:Int) -> (Int) -> Int { + return { + return $0 + x; + } +} + +let add5 = makeAdder3(x:5) +let add10 = makeAdder3(x:10) + +print(add5(2)) +print(add10(2)) + +print(makeAdder3(x:5)(2)) + + +//: Session 5-6 map +let transactions = [560.0, 321.5, 190.0, 672.8, 1190.0, 450.0] + +func addVAT2(source:Double) -> Double { + return source * 1.1 +} + +var vatPrices:[Double] = [] +for transaction in transactions { + vatPrices += [addVAT2(source:transaction)] +} + +let vatMapPrices = transactions.map({ transaction -> Double in + return transaction * 1.1 +}) + +let vatMapPrices2 = transactions.map({ $0 * 1.1 }) + +print("hi") + +//: Session 5-7 filter +var bigTransactions:[Double] = [] +for price in vatPrices { + if price >= 500 { + bigTransactions += [price] + } +} + +let bigFilterTransactions = vatPrices.filter{ $0 >= 500 } +var meetingRooms:[String:Int] = ["Banksy":4, "Rivera":8, "Kahlo":8, "Picasso":10, "Cezanne":20, "Matisse":30] + +let members = 9 +let available = meetingRooms.filter{ $0.1 > members} +print(available) + + +//: Session 5-8 sort + +func ascendantSort (sort1:Double, sort2:Double) -> Bool { + return sort1 > sort2 +} + +let sortedPrices = vatPrices.sorted(by:ascendantSort) +let sortedPrices2 = vatPrices.sorted(by:{ sort1, sort2 in + return sort1 > sort2 +}) +let sortedPrices3 = vatPrices.sorted(by:{ $0 > $1 }) +let sortedPrices4 = vatPrices.sorted(by: > ) + +let sortedMeetingRooms = meetingRooms.sorted(by: {$0.1 > $1.1}) +print("\(sortedMeetingRooms)") + +//: Session 5-9 reduce + + + +func priceSum (base:Double, adder:Double) -> Double { + return base + adder +} + +var sum:Double = 0.0 + +for price in vatPrices { + sum = priceSum(base: sum, adder: price) +} + +print("\(sum)") +var sum2:Double = 0.0 +let sumReduce = vatPrices.reduce(sum2, priceSum) +let sumReduce2 = vatPrices.reduce(0.0, { base, adder in + base + adder +}) +let sumReduce3 = vatPrices.reduce(0, +) + + +let pricesInString = vatPrices.reduce("", {$0 + "\($1)\n"}) + +print(pricesInString) + + +let descriptionString = meetingRooms.reduce("We have meeting rooms : \n", { $0 + "\($1.0) for \($1.1) person \n" + +}) + +print(descriptionString) + +//: Session 5-10 MeetingRooms 정렬 +let x = [10, 3, 20, 15, 4].sorted {$0 < $1}.filter { $0 > 5 }.map { $0 * 100 } + +let x2 = [10, 3, 20, 15, 4].sorted {$0 < $1} +x2 + + + diff --git a/TaehyeonKim/SwiftFunctionType.playground/contents.xcplayground b/TaehyeonKim/SwiftFunctionType.playground/contents.xcplayground new file mode 100644 index 0000000..5da2641 --- /dev/null +++ b/TaehyeonKim/SwiftFunctionType.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/TaehyeonKim/SwiftFunctionType.playground/playground.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/SwiftFunctionType.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TaehyeonKim/SwiftFunctionType.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TaehyeonKim/session2.playground/Contents.swift b/TaehyeonKim/session2.playground/Contents.swift new file mode 100644 index 0000000..1a47bac --- /dev/null +++ b/TaehyeonKim/session2.playground/Contents.swift @@ -0,0 +1,632 @@ +//: Playground - noun: a place where people can play + + +import UIKit + +//: Session 2-2 + +let maxSpeed:Int = 200 +//maxSpeed += 10 + +var currentSpeed:Int = 110 +currentSpeed += 10 +//currentSpeed += 20.5 + +//: Session 2-3 + +let name:String = "Seongkwan" +var greeting = "Hello" +greeting += " " + name + +let characters = name.characters +let count = characters.count + +let url = "www.codershigh.com" +let hasProtocol:Bool = url.hasPrefix("http://") + +print("\(name)") +print("\(name) has \(count) characters") + +//currentSpeed += Int(20.5) + +let intMax = Int.max +let UintMax = UInt.max +let intMin = Int.min +let UintMin = UInt.min + +let pi = 3.14 +let divider = 2 +//let halfPi = 3.14/divider +let halfPi = 3.14/Double(divider) + + +//: Session 2-4 튜플 + +let time1 = (9,0,48) +time1.0 +let time2:(h:Int, m:Int, s:Int) = (11,51,5) +time2.h + +let duration = (time1, time2) +let (start, end) = duration +let endHour = end.h + +typealias Time = (h:Int, m:Int, s:Int) +typealias Duration = (start:Time, end:Time) + +let today:Duration = ((9,10,23), (17,8,21)) +print("We studied \(today.end.h - today.start.h) hours today") + + +//: Session 2-5 컬렉션 +//:: Dictionary + +var meetingRooms:Array = ["Banksy", "Rivera", "Kahlo", "Picasso", "Cezanne", "Matisse"] +var groups:[Int] = [10, 8, 14, 9] + +meetingRooms += ["Renoir"] + + +var speedHistory:[Int] = [] +speedHistory += [currentSpeed] +let gpsSpeed0901 = 114.1 +speedHistory.append(Int(gpsSpeed0901)) + +speedHistory[0] +speedHistory.last + + + +let historyBackup = speedHistory +speedHistory += [150] +historyBackup + +//: Session 2-6 컬렉션2 Dictionary +var roomCapacity:[String:Int] = ["Banksy":4, "Rivera":8, "Kahlo":8, "Picasso":10, "Cezanne":20, "Matisse":30] + +//roomCapacity += ["Renoir":40] +roomCapacity["Renoir"] = 40 +roomCapacity["Kahlo"] + +//let roomNames = roomCapacity.keys +//let capacities = roomCapacity.values + + +let roomNames = [String](roomCapacity.keys) +let capacities = [Int](roomCapacity.values) + +let total = capacities.reduce(0, +) + +//: Session 2-6 컬렉션2 Set +let subway2 :Set = ["시청", "을지로입구", "을지로3가", "을지로4가","동대문역사문화공원", "신당", "상왕십리", "왕십리", "한양대", "뚝섬", "성수", "건대입구", "구의", "강변", "잠실나루", "잠실", "신천", "종합운동장", "삼성", "선릉", "역삼", "강남", "교대", "서초", "방배", "사당", "낙성대", "서울대입구", "봉천", "신림", "신대방", "구로디지털단지", "대림", "신도림", "문래", "영등포구청", "당산", "합정", "홍대입구", "신촌", "이대", "아현", "충정로"] +subway2.count + +let subway3 :Set = ["지축", "구파발", "연신내", "불광", "녹번", "홍제", "무악재", "독립문", "경복궁", "안국", "종로3가", "을지로3가", "충무로", "동대입구", "약수", "금호", "옥수", "압구정", "신사", "잠원", "고속터미널", "교대", "남부터미널", "양재", "매봉", "도곡", "대치", "학여울", "대청", "일원", "수서", "가락시장", "경찰병원", "오금"] +subway3.count + +let transfer = subway2.intersection(subway3) +transfer.count +let notTransfer = subway2.subtracting(subway3) +notTransfer.count + +let union = subway2.union(subway3) +union.count +let exOR = subway2.symmetricDifference(subway3) +exOR.count + +if transfer.count > 0 { + print("환승역은 \(transfer) 입니다.") +} else { + print("환승역은 없습니다.") +} + +for station in subway2 { + print("이번 역은 \(station)입니다.") +} + +for i in 0...3 { + print("\(i+1) 번째 회의실은 \(roomNames[i])입니다.") +} + +for (roomName, capacity) in roomCapacity { + "\(roomName)의 정원은 \(capacity)명입니다." +} + + +for (roomName, capacity) in roomCapacity { + let roomDescription:String + switch capacity { + case 4: + roomDescription = "\(roomName)은 스터디 룸이며 정원은 \(capacity)명입니다." + case 5...10: + roomDescription = "\(roomName)은 팀 세미나 룸이며 정원은 \(capacity)명입니다." + case 11...30: + roomDescription = "\(roomName)은 그룹 세미나 룸이며 정원은 \(capacity)명입니다." + case let caseCapacity where caseCapacity > 30: + roomDescription = "\(roomName)의 정원은 \(capacity)명이며 별도의 사용신청이 필요합니다." + default: + roomDescription = "\(roomName)의 정보를 다시 확인해 주세요" + } + print("\(roomDescription)") +} + + +//: Session 2-8 옵셔널 + +var title : String = "Storyboard Prototyping" +var ratings : [Double]? = nil +var supportURL : String? = nil + +//print ("\(title) has \(ratings!.count) ratings. \r\nsupport web page : \(supportURL)") + +//: Session 2-9 옵셔널 +supportURL = "www.codershigh.com" + +var bookDescription:String = "\(title)" +if ratings != nil { + bookDescription += "has \(ratings!.count) ratings" +} +if supportURL != nil { + bookDescription += "\r\nsupport web page: \(supportURL!)" +} + +print("\(bookDescription)") + +//: Session 2-10 옵셔널 +if let theRatings = ratings { + bookDescription += "has \(theRatings.count) ratings" +} +if let theURL = supportURL { + bookDescription += "\r\nsupport web page: \(theURL)" +} + +var supportingURL : String! = nil +supportingURL = "www.codershigh.com" +bookDescription += "\r\nsupport web page: \(supportingURL)" + + + +//: Session 2-11 Functions + +func ratingRecord (history:[Double]) -> (average:Double, min:Double, max:Double)? { + + if history.count == 0 { return nil } + + var sum = 0.0, min = history[0], max = history[0] + + for value in history { + if min > value { min = value } + if max < value { max = value } + sum += value + } + + let average = sum / Double(history.count) + return (average, min, max) +} + +ratings = [3.5, 2.0, 4.5, 5.0] +bookDescription = "\(title)" + +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" +} + + +bookDescription + +/* + 1. record의 Type을 명시하시오 + 2. ratings = [] 일때 문제 해결 방식 고민 + */ +//: Session 2-12 Structure + +_={ + + struct Task { + var title:String//? + var time:Int? + } + + var callTask = Task(title: "Call to Randy", time: 10*60) + //var reportTask = Task() + var reportTask = Task(title:"Report to Boss", time: nil) + + var todayTask:[Task] = [] + todayTask += [callTask, reportTask] + todayTask[1].time = 15*60 + + callTask.title = "Call to Toby" + print("today task = \(todayTask) \r\n callTask = \(callTask)") + +} + +//: Session 2-13 Class +_={ + + class Employee { + var name:String? + var phoneNumber:String? + var boss:Employee? + } + + struct Task { + var title:String + var time:Int? + + var owner:Employee + var participant:Employee? + } + + let me:Employee = Employee() + me.name = "Alex" + me.phoneNumber = "010-1234-5678" + + let toby:Employee = Employee() + toby.name = "Toby" + toby.phoneNumber = "011-5678-1234" + + var callTask = Task(title: "Call to Toby", time: 10*60, owner:me, participant:toby) + var reportTask = Task(title:"Report to Boss", time: nil, owner:me, participant:nil) + callTask.participant?.phoneNumber = "010-5678-1234" + + var todayTask:[Task] = [] + todayTask += [callTask, reportTask] + todayTask[1].time = 15*60 +} + + +//: Session 2-14 Enumerations +_={ + + class Employee { + var name:String? + var phoneNumber:String? + var boss:Employee? + } + + struct Task { + var title:String + var time:Int? + + var owner:Employee + var participant:Employee? + + var type:TaskType + + enum TaskType { + case Call + case Report + case Meet + case Support + + var typeTitle:String { + get { + let titleString:String + switch self { + case .Call: + titleString = "Call" + case .Report: + titleString = "Report" + case .Meet: + titleString = "Meet" + case .Support: + titleString = "Support" + } + return titleString + } + } + } + } + + let me:Employee = Employee() + me.name = "Alex" + me.phoneNumber = "010-1234-5678" + + let toby:Employee = Employee() + toby.name = "Toby" + toby.phoneNumber = "011-5678-1234" + + var callTask = Task(title: "Call to Toby", time: 10*60, owner:me, participant:toby, type:.Call) + var reportTask = Task(title:"Report to Boss", time: nil, owner:me, participant:nil, type:Task.TaskType.Report) + + callTask.participant?.phoneNumber = "010-5678-1234" + + var todayTask:[Task] = [] + todayTask += [callTask, reportTask] + todayTask[1].time = 15*60 +} + + +//: Session 2-15 Initialize +_={ + + class Employee { + var name:String? + var phoneNumber:String? + var boss:Employee? + + init (name:String){ + self.name = name + } + convenience init (name:String, phone:String) { + self.init(name:name) + self.phoneNumber = phone + } + } + + struct Task { + var title:String + var time:Int? + + var owner:Employee + var participant:Employee? + + var type:TaskType + + enum TaskType { + case Call + case Report + case Meet + case Support + + var typeTitle:String { + get { + let titleString:String + switch self { + case .Call: + titleString = "Call" + case .Report: + titleString = "Report" + case .Meet: + titleString = "Meet" + case .Support: + titleString = "Support" + } + return titleString + } + } + } + + init (type:TaskType, owner:Employee) { + self.type = type + self.title = type.typeTitle + self.owner = owner + self.time = nil + self.participant = nil + } + } + + let me:Employee = Employee(name: "Alex", phone:"010-1234-5678") + + let toby:Employee = Employee(name: "Toby") + toby.phoneNumber = "011-5678-1234" + + var callTask = Task(type:.Call, owner:me) + callTask.time = 10*60 + var reportTask = Task(type:.Report, owner:me) + + callTask.participant?.phoneNumber = "010-5678-1234" + + var todayTask:[Task] = [] + todayTask += [callTask, reportTask] + todayTask[1].time = 15*60 +} + +//: Session 2-16 Method +_={ + + class Employee { + var name:String? + var phoneNumber:String? + var boss:Employee? + + init (name:String){ + self.name = name + } + convenience init (name:String, phone:String) { + self.init(name:name) + self.phoneNumber = phone + } + + func report() { + if let myBoss = boss { + print("\(self.name) reported to \(myBoss.name)") + } else { + print("\(name) don't have boss") + } + } + + func callTaskToBoss() -> Task? { + if let myBoss = boss, let callTo = myBoss.phoneNumber { + var callTask = Task(type: .Call, owner: self) + return callTask + } + return nil + } + } + + struct Task { + var title:String + var time:Int? + + var owner:Employee + var participant:Employee? + + var type:TaskType + + enum TaskType { + case Call + case Report + case Meet + case Support + + var typeTitle:String { + get { + let titleString:String + switch self { + case .Call: + titleString = "Call" + case .Report: + titleString = "Report" + case .Meet: + titleString = "Meet" + case .Support: + titleString = "Support" + } + return titleString + } + } + } + + init (type:TaskType, owner:Employee) { + self.type = type + self.title = type.typeTitle + self.owner = owner + self.time = nil + self.participant = nil + } + } + + var todayTask:[Task] = [] + + let me:Employee = Employee(name: "Alex", phone:"010-1234-5678") + + let toby:Employee = Employee(name: "Toby") + toby.phoneNumber = "011-5678-1234" + + me.boss = toby + me.report() + + var reportTask = Task(type:.Report, owner:me) + todayTask += [reportTask] + + if let callTask = me.callTaskToBoss() { + todayTask += [callTask] + } +} + +//: Session 2-17 Enum Associated Value +enum Barcode { + case UPCA(Int, Int, Int, Int) + case QRCode(String) +} + +var productBarcode = Barcode.UPCA(8, 85909, 51226, 3) +productBarcode = .QRCode("ABCDEFGHIJKLMNOP") + +_={ + + class Employee { + var name:String? + var phoneNumber:String? + var boss:Employee? + + init (name:String){ + self.name = name + } + convenience init (name:String, phone:String) { + self.init(name:name) + self.phoneNumber = phone + } + + func report() { + if let myBoss = boss { + print("\(self.name) reported to \(myBoss.name)") + } else { + print("\(name) don't have boss") + } + } + + func callTaskToBoss() -> Task? { + if let myBoss = boss, let callTo = myBoss.phoneNumber { + var callTask = Task(type: .Call(number:callTo), owner: self) + return callTask + } + return nil + } + } + + struct Task { + var title:String + var time:Int? + + var owner:Employee + //var participant:Employee? + + var type:TaskType + + enum TaskType { + case Call(number:String) + case Report(to:Employee, when:String) + case Meet(with:Employee, location:String) + case Support(who:Employee, duration:Int) + + var typeTitle:String { + get { + let titleString:String + switch self { + case .Call: + titleString = "Call" + case .Report: + titleString = "Report" + case .Meet: + titleString = "Meet" + case .Support: + titleString = "Support" + } + return titleString + } + } + } + + init (type:TaskType, owner:Employee) { + self.type = type + self.title = type.typeTitle + self.owner = owner + self.time = nil + //self.participant = nil + } + + func doBasicTask() ->String { + let taskDescription:String + switch type { + case .Call(let number) : + taskDescription = "\(owner.name) make a call to \(number)" + case .Report(let receiver, let time) : + taskDescription = "\(owner.name) report to \(receiver.name) at \(time)" + case .Meet(let participant, let location) : + taskDescription = "\(owner.name) meet \(participant.name) at \(location)" + case .Support(let taskOwner, let duration) : + taskDescription = "\(owner.name) support \(taskOwner.name) for \(duration) days" + default: + taskDescription = "Need more information for task." + } + return taskDescription + } + } + + var todayTask:[Task] = [] + + let me:Employee = Employee(name: "Alex", phone:"010-1234-5678") + + let toby:Employee = Employee(name: "Toby") + toby.phoneNumber = "011-5678-1234" + + me.boss = toby + me.report() + + var reportTask = Task(type:.Report(to:toby, when:"Afternoon"), owner:me) + todayTask += [reportTask] + + if let callTask = me.callTaskToBoss() { + todayTask += [callTask] + callTask.doBasicTask() + } + + reportTask.doBasicTask() +} + + + diff --git a/TaehyeonKim/session2.playground/contents.xcplayground b/TaehyeonKim/session2.playground/contents.xcplayground new file mode 100644 index 0000000..5da2641 --- /dev/null +++ b/TaehyeonKim/session2.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/TaehyeonKim/session2.playground/playground.xcworkspace/contents.xcworkspacedata b/TaehyeonKim/session2.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TaehyeonKim/session2.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + +