From 0049368003b53a9f637dfa12cfced3bbb203b8b1 Mon Sep 17 00:00:00 2001 From: Liguo Jiao's Mac Date: Sat, 21 Nov 2015 02:07:13 +1300 Subject: [PATCH] Setup basic framework and random selection --- .../project.pbxproj | 441 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 17639 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 39 ++ .../xcschemes/Dynamic Animation Game.xcscheme | 112 +++++ .../xcschemes/xcschememanagement.plist | 27 ++ Dynamic Animation Game/AppDelegate.swift | 111 +++++ .../Base.lproj/LaunchScreen.xib | 41 ++ .../Base.lproj/Main.storyboard | 38 ++ .../.xccurrentversion | 8 + .../contents | 4 + .../AppIcon.appiconset/Contents.json | 38 ++ Dynamic Animation Game/Info.plist | 40 ++ Dynamic Animation Game/ViewController.swift | 60 +++ .../Dynamic_Animation_GameTests.swift | 36 ++ Dynamic Animation GameTests/Info.plist | 24 + 16 files changed, 1026 insertions(+) create mode 100644 Dynamic Animation Game.xcodeproj/project.pbxproj create mode 100644 Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme create mode 100644 Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 Dynamic Animation Game/AppDelegate.swift create mode 100644 Dynamic Animation Game/Base.lproj/LaunchScreen.xib create mode 100644 Dynamic Animation Game/Base.lproj/Main.storyboard create mode 100644 Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion create mode 100644 Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents create mode 100644 Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Dynamic Animation Game/Info.plist create mode 100644 Dynamic Animation Game/ViewController.swift create mode 100644 Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift create mode 100644 Dynamic Animation GameTests/Info.plist diff --git a/Dynamic Animation Game.xcodeproj/project.pbxproj b/Dynamic Animation Game.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0bdb4d5 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/project.pbxproj @@ -0,0 +1,441 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 054D19E11BFF468A00D53644 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E01BFF468A00D53644 /* AppDelegate.swift */; }; + 054D19E41BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */; }; + 054D19E61BFF468A00D53644 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E51BFF468A00D53644 /* ViewController.swift */; }; + 054D19E91BFF468A00D53644 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 054D19E71BFF468A00D53644 /* Main.storyboard */; }; + 054D19EB1BFF468A00D53644 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 054D19EA1BFF468A00D53644 /* Images.xcassets */; }; + 054D19EE1BFF468A00D53644 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */; }; + 054D19FA1BFF468A00D53644 /* Dynamic_Animation_GameTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 054D19F41BFF468A00D53644 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 054D19D31BFF468A00D53644 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 054D19DA1BFF468A00D53644; + remoteInfo = "Dynamic Animation Game"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dynamic Animation Game.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 054D19DF1BFF468A00D53644 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 054D19E01BFF468A00D53644 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Dynamic_Animation_Game.xcdatamodel; sourceTree = ""; }; + 054D19E51BFF468A00D53644 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 054D19E81BFF468A00D53644 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 054D19EA1BFF468A00D53644 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 054D19ED1BFF468A00D53644 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Dynamic Animation GameTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 054D19F81BFF468A00D53644 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dynamic_Animation_GameTests.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 054D19D81BFF468A00D53644 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19F01BFF468A00D53644 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 054D19D21BFF468A00D53644 = { + isa = PBXGroup; + children = ( + 054D19DD1BFF468A00D53644 /* Dynamic Animation Game */, + 054D19F61BFF468A00D53644 /* Dynamic Animation GameTests */, + 054D19DC1BFF468A00D53644 /* Products */, + ); + sourceTree = ""; + }; + 054D19DC1BFF468A00D53644 /* Products */ = { + isa = PBXGroup; + children = ( + 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */, + 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 054D19DD1BFF468A00D53644 /* Dynamic Animation Game */ = { + isa = PBXGroup; + children = ( + 054D19E01BFF468A00D53644 /* AppDelegate.swift */, + 054D19E51BFF468A00D53644 /* ViewController.swift */, + 054D19E71BFF468A00D53644 /* Main.storyboard */, + 054D19EA1BFF468A00D53644 /* Images.xcassets */, + 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */, + 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */, + 054D19DE1BFF468A00D53644 /* Supporting Files */, + ); + path = "Dynamic Animation Game"; + sourceTree = ""; + }; + 054D19DE1BFF468A00D53644 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 054D19DF1BFF468A00D53644 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 054D19F61BFF468A00D53644 /* Dynamic Animation GameTests */ = { + isa = PBXGroup; + children = ( + 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */, + 054D19F71BFF468A00D53644 /* Supporting Files */, + ); + path = "Dynamic Animation GameTests"; + sourceTree = ""; + }; + 054D19F71BFF468A00D53644 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 054D19F81BFF468A00D53644 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */ = { + isa = PBXNativeTarget; + buildConfigurationList = 054D19FD1BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation Game" */; + buildPhases = ( + 054D19D71BFF468A00D53644 /* Sources */, + 054D19D81BFF468A00D53644 /* Frameworks */, + 054D19D91BFF468A00D53644 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Dynamic Animation Game"; + productName = "Dynamic Animation Game"; + productReference = 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */; + productType = "com.apple.product-type.application"; + }; + 054D19F21BFF468A00D53644 /* Dynamic Animation GameTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 054D1A001BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation GameTests" */; + buildPhases = ( + 054D19EF1BFF468A00D53644 /* Sources */, + 054D19F01BFF468A00D53644 /* Frameworks */, + 054D19F11BFF468A00D53644 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 054D19F51BFF468A00D53644 /* PBXTargetDependency */, + ); + name = "Dynamic Animation GameTests"; + productName = "Dynamic Animation GameTests"; + productReference = 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 054D19D31BFF468A00D53644 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = "Liguo Jiao"; + TargetAttributes = { + 054D19DA1BFF468A00D53644 = { + CreatedOnToolsVersion = 6.3; + }; + 054D19F21BFF468A00D53644 = { + CreatedOnToolsVersion = 6.3; + TestTargetID = 054D19DA1BFF468A00D53644; + }; + }; + }; + buildConfigurationList = 054D19D61BFF468A00D53644 /* Build configuration list for PBXProject "Dynamic Animation Game" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 054D19D21BFF468A00D53644; + productRefGroup = 054D19DC1BFF468A00D53644 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */, + 054D19F21BFF468A00D53644 /* Dynamic Animation GameTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 054D19D91BFF468A00D53644 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19E91BFF468A00D53644 /* Main.storyboard in Resources */, + 054D19EE1BFF468A00D53644 /* LaunchScreen.xib in Resources */, + 054D19EB1BFF468A00D53644 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19F11BFF468A00D53644 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 054D19D71BFF468A00D53644 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19E61BFF468A00D53644 /* ViewController.swift in Sources */, + 054D19E41BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld in Sources */, + 054D19E11BFF468A00D53644 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19EF1BFF468A00D53644 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19FA1BFF468A00D53644 /* Dynamic_Animation_GameTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 054D19F51BFF468A00D53644 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */; + targetProxy = 054D19F41BFF468A00D53644 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 054D19E71BFF468A00D53644 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 054D19E81BFF468A00D53644 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 054D19ED1BFF468A00D53644 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 054D19FB1BFF468A00D53644 /* 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-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = 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_SYMBOLS_PRIVATE_EXTERN = NO; + 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 = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 054D19FC1BFF468A00D53644 /* 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 = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 054D19FE1BFF468A00D53644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Dynamic Animation Game/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 054D19FF1BFF468A00D53644 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Dynamic Animation Game/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 054D1A011BFF468A00D53644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "Dynamic Animation GameTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dynamic Animation Game.app/Dynamic Animation Game"; + }; + name = Debug; + }; + 054D1A021BFF468A00D53644 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = "Dynamic Animation GameTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dynamic Animation Game.app/Dynamic Animation Game"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 054D19D61BFF468A00D53644 /* Build configuration list for PBXProject "Dynamic Animation Game" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D19FB1BFF468A00D53644 /* Debug */, + 054D19FC1BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 054D19FD1BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation Game" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D19FE1BFF468A00D53644 /* Debug */, + 054D19FF1BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 054D1A001BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation GameTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D1A011BFF468A00D53644 /* Debug */, + 054D1A021BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */, + ); + currentVersion = 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */; + path = Dynamic_Animation_Game.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 054D19D31BFF468A00D53644 /* Project object */; +} diff --git a/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0e829e2 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate b/Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..9904b169861c7b5437f8c3c03ac3ac6fed6b935c GIT binary patch literal 17639 zcmd6O30RZI*8j}A5S9R84IzOnkg!M=l0bsCDu^iV%A$f614K*>1e1WGwa#0ut#!AX zZLJlsTD4y7zPfa^+TPZxt+k8Y>s7ng?zR5Uo0kBww7uW|`JQ_}e1znkdC#0V=gc|3 zb7rQ#)$Q{6O{NnFBMQ-oK`aVmzh=Lgmf7y~`dprtX_=n-tDOyg-}Fp}w_%P89#>}i zJ+1KwFW<5!4sS&w6pj*5B1%G8C>!OVTr>#fAw4o6BeI|(G#O1n6{r$bp=vZ0O+(XB z4XQ;m&`fj{YD7+SHS!`K@}oA?jye#Bu0z+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#1do8=I@hRpx4PwYk~3gK`bILvn}a z7U!1cj>;XAJ3e<}?u^{4a%bf>tLCXi-IA~>FR9;G6YMvrb znRid#{dxb$+ne{0-l89_FVUCkN9mu_AJw1IzoUOo|Gxf1{W<*?`mgoh>c7|jXh4Pt zgT#<#&>6A~xrRK0!C*5CHe6{KW+*X~8pa!H3{8esgV*3Uv>O%}IKwi-4TcqlRfaW& z+YMU{4;Y>_JZ;!-IB0m*@Ur1m!|R6QhBpmw89p?8Y53L17{iR=#z>>sm}E>b%8hA8 zl~H3HWV9Pc8YdVh8K)R4jn&3FW4+O7Y%*SLbQ{}@ON=Xww;As+ZZh6u>@sdOK4^T| z_?Gd!@k`@3#tX(DjlUQ#nvjV$g_&d~g(=;nGHFa&Q?_Z4$zU>>%%&?$qfE0*ZqriJ zM$>N73#QYi?_k4VNPbEFxcuq)GxF>5>+_xYP5J)(_WT9;i}Ej+u{q2fVHTU?%!y{H zS!Pz6b!Ma4ZZ0;Ln#;_i%~j?Z<~nn|*=cs0J!Y@D%{>6a7Fg}pA=VPOfIr$g);iu=ZJloQT9;UtTUS_DS=U-`vu?EBW!-Gu zV%=`tYkl07W>eX6Y&P3a+eq6KTb-@m=CsYR&9$}I=Gm^bakizl<+c^JmA2KkwYG~(gp-EUuPUuWN7ztz6cewTf-z0 + + + + + + + + + + + + diff --git a/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme new file mode 100644 index 0000000..18f8aa9 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..eae8a80 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + Dynamic Animation Game.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 054D19DA1BFF468A00D53644 + + primary + + + 054D19F21BFF468A00D53644 + + primary + + + + + diff --git a/Dynamic Animation Game/AppDelegate.swift b/Dynamic Animation Game/AppDelegate.swift new file mode 100644 index 0000000..473d284 --- /dev/null +++ b/Dynamic Animation Game/AppDelegate.swift @@ -0,0 +1,111 @@ +// +// AppDelegate.swift +// Dynamic Animation Game +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit +import CoreData + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> 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:. + // Saves changes in the application's managed object context before the application terminates. + self.saveContext() + } + + // MARK: - Core Data stack + + lazy var applicationDocumentsDirectory: NSURL = { + // The directory the application uses to store the Core Data store file. This code uses a directory named "McKay.Dynamic_Animation_Game" in the application's documents Application Support directory. + let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) + return urls[urls.count-1] as! NSURL + }() + + lazy var managedObjectModel: NSManagedObjectModel = { + // The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model. + let modelURL = NSBundle.mainBundle().URLForResource("Dynamic_Animation_Game", withExtension: "momd")! + return NSManagedObjectModel(contentsOfURL: modelURL)! + }() + + lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = { + // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. + // Create the coordinator and store + var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) + let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("Dynamic_Animation_Game.sqlite") + var error: NSError? = nil + var failureReason = "There was an error creating or loading the application's saved data." + if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil { + coordinator = nil + // Report any error we got. + var dict = [String: AnyObject]() + dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data" + dict[NSLocalizedFailureReasonErrorKey] = failureReason + dict[NSUnderlyingErrorKey] = error + error = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict) + // Replace this with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog("Unresolved error \(error), \(error!.userInfo)") + abort() + } + + return coordinator + }() + + lazy var managedObjectContext: NSManagedObjectContext? = { + // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail. + let coordinator = self.persistentStoreCoordinator + if coordinator == nil { + return nil + } + var managedObjectContext = NSManagedObjectContext() + managedObjectContext.persistentStoreCoordinator = coordinator + return managedObjectContext + }() + + // MARK: - Core Data Saving support + + func saveContext () { + if let moc = self.managedObjectContext { + var error: NSError? = nil + if moc.hasChanges && !moc.save(&error) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog("Unresolved error \(error), \(error!.userInfo)") + abort() + } + } + } + +} + diff --git a/Dynamic Animation Game/Base.lproj/LaunchScreen.xib b/Dynamic Animation Game/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..156c248 --- /dev/null +++ b/Dynamic Animation Game/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game/Base.lproj/Main.storyboard b/Dynamic Animation Game/Base.lproj/Main.storyboard new file mode 100644 index 0000000..2fd29ad --- /dev/null +++ b/Dynamic Animation Game/Base.lproj/Main.storyboard @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..b692205 --- /dev/null +++ b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + Dynamic_Animation_Game.xcdatamodel + + diff --git a/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents new file mode 100644 index 0000000..193f33c --- /dev/null +++ b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json b/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Dynamic Animation Game/Info.plist b/Dynamic Animation Game/Info.plist new file mode 100644 index 0000000..09af34e --- /dev/null +++ b/Dynamic Animation Game/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + McKay.$(PRODUCT_NAME:rfc1034identifier) + 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 + + + diff --git a/Dynamic Animation Game/ViewController.swift b/Dynamic Animation Game/ViewController.swift new file mode 100644 index 0000000..44549ec --- /dev/null +++ b/Dynamic Animation Game/ViewController.swift @@ -0,0 +1,60 @@ +// +// ViewController.swift +// Dynamic Animation Game +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + @IBOutlet var backgroundView: UIView! + @IBAction func dropDown(sender: AnyObject) { + drop() + } + @IBOutlet weak var smallBox: UIView! + var dropSize: CGSize { + let size = backgroundView.bounds.size.width / CGFloat(dropRow) + return CGSize(width: size, height: size) + } + var dropRow = 10 + + func drop() { + var frame = CGRect(origin: CGPointZero, size: dropSize) + frame.origin.x = CGFloat.random(dropRow) * dropSize.width + print(frame.origin.x) + let dropView = UIView(frame: frame) + dropView.backgroundColor = UIColor.random + backgroundView.addSubview(dropView) + } + 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. + } +} + +private extension CGFloat { + static func random(max: Int) -> CGFloat { + return CGFloat(arc4random() % UInt32(max)) + } +} + +private extension UIColor { + // TODO: Change to UIImage + class var random: UIColor { + switch arc4random()%5 { + case 0: return UIColor.greenColor() + case 1: return UIColor.grayColor() + case 2: return UIColor.blackColor() + case 3: return UIColor.brownColor() + case 4: return UIColor.redColor() + default: return UIColor.purpleColor() + } + } +} diff --git a/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift b/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift new file mode 100644 index 0000000..7f81572 --- /dev/null +++ b/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift @@ -0,0 +1,36 @@ +// +// Dynamic_Animation_GameTests.swift +// Dynamic Animation GameTests +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit +import XCTest + +class Dynamic_Animation_GameTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock() { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Dynamic Animation GameTests/Info.plist b/Dynamic Animation GameTests/Info.plist new file mode 100644 index 0000000..f590919 --- /dev/null +++ b/Dynamic Animation GameTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + McKay.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + +