diff --git a/Answers.txt b/Answers.txt new file mode 100644 index 0000000..149d45e --- /dev/null +++ b/Answers.txt @@ -0,0 +1,18 @@ + +Why do we use version control? +Version control allows programmers to remotely store and edit projects. + +Under what circumstances would you need version control features and why? +When working with a group it allows multiple programmers to work on the same project at the same time. + +What are the navigator, editor, and inspectors areas in Xcode? +Navigator is on the left typically used for switching between files. Editor is where u write the code. Inspector is on the right where you can edit. + +What are their roles and how do you use them? +Help organize, you use them by clicking on them. + +How do you center a view in Interface Builder? How do you stretch one? +Center a view or stretch one with constraints. + +What is SpriteKit and why do people use it? +SpiteKit is for using sprites for images. \ No newline at end of file diff --git a/Sprites App day 1/Sprites App day 1.xcodeproj/project.pbxproj b/Sprites App day 1/Sprites App day 1.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bea154f --- /dev/null +++ b/Sprites App day 1/Sprites App day 1.xcodeproj/project.pbxproj @@ -0,0 +1,349 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 840A804921E401D00010A5B5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A804821E401D00010A5B5 /* AppDelegate.swift */; }; + 840A804B21E401D00010A5B5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A804A21E401D00010A5B5 /* ViewController.swift */; }; + 840A804E21E401D00010A5B5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 840A804C21E401D00010A5B5 /* Main.storyboard */; }; + 840A805021E401D10010A5B5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 840A804F21E401D10010A5B5 /* Assets.xcassets */; }; + 840A805321E401D10010A5B5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 840A805121E401D10010A5B5 /* LaunchScreen.storyboard */; }; + 840A805B21E404380010A5B5 /* CustomScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A805A21E404380010A5B5 /* CustomScene.swift */; }; + 840A805D21E406C40010A5B5 /* RandomColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A805C21E406C40010A5B5 /* RandomColor.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 840A804521E401D00010A5B5 /* Sprites App day 1.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sprites App day 1.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 840A804821E401D00010A5B5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 840A804A21E401D00010A5B5 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 840A804D21E401D00010A5B5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 840A804F21E401D10010A5B5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 840A805221E401D10010A5B5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 840A805421E401D10010A5B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 840A805A21E404380010A5B5 /* CustomScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomScene.swift; sourceTree = ""; }; + 840A805C21E406C40010A5B5 /* RandomColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomColor.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 840A804221E401D00010A5B5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 840A803C21E401D00010A5B5 = { + isa = PBXGroup; + children = ( + 840A804721E401D00010A5B5 /* Sprites App day 1 */, + 840A804621E401D00010A5B5 /* Products */, + ); + sourceTree = ""; + }; + 840A804621E401D00010A5B5 /* Products */ = { + isa = PBXGroup; + children = ( + 840A804521E401D00010A5B5 /* Sprites App day 1.app */, + ); + name = Products; + sourceTree = ""; + }; + 840A804721E401D00010A5B5 /* Sprites App day 1 */ = { + isa = PBXGroup; + children = ( + 840A804821E401D00010A5B5 /* AppDelegate.swift */, + 840A804A21E401D00010A5B5 /* ViewController.swift */, + 840A805A21E404380010A5B5 /* CustomScene.swift */, + 840A804C21E401D00010A5B5 /* Main.storyboard */, + 840A805C21E406C40010A5B5 /* RandomColor.swift */, + 840A804F21E401D10010A5B5 /* Assets.xcassets */, + 840A805121E401D10010A5B5 /* LaunchScreen.storyboard */, + 840A805421E401D10010A5B5 /* Info.plist */, + ); + path = "Sprites App day 1"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 840A804421E401D00010A5B5 /* Sprites App day 1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 840A805721E401D10010A5B5 /* Build configuration list for PBXNativeTarget "Sprites App day 1" */; + buildPhases = ( + 840A804121E401D00010A5B5 /* Sources */, + 840A804221E401D00010A5B5 /* Frameworks */, + 840A804321E401D00010A5B5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Sprites App day 1"; + productName = "Sprites App day 1"; + productReference = 840A804521E401D00010A5B5 /* Sprites App day 1.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 840A803D21E401D00010A5B5 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = SeanDoyle; + TargetAttributes = { + 840A804421E401D00010A5B5 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 840A804021E401D00010A5B5 /* Build configuration list for PBXProject "Sprites App day 1" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 840A803C21E401D00010A5B5; + productRefGroup = 840A804621E401D00010A5B5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 840A804421E401D00010A5B5 /* Sprites App day 1 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 840A804321E401D00010A5B5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 840A805321E401D10010A5B5 /* LaunchScreen.storyboard in Resources */, + 840A805021E401D10010A5B5 /* Assets.xcassets in Resources */, + 840A804E21E401D00010A5B5 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 840A804121E401D00010A5B5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 840A805D21E406C40010A5B5 /* RandomColor.swift in Sources */, + 840A804B21E401D00010A5B5 /* ViewController.swift in Sources */, + 840A804921E401D00010A5B5 /* AppDelegate.swift in Sources */, + 840A805B21E404380010A5B5 /* CustomScene.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 840A804C21E401D00010A5B5 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 840A804D21E401D00010A5B5 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 840A805121E401D10010A5B5 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 840A805221E401D10010A5B5 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 840A805521E401D10010A5B5 /* 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_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 840A805621E401D10010A5B5 /* 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_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 840A805821E401D10010A5B5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4L7P3ZX586; + INFOPLIST_FILE = "Sprites App day 1/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.lambdaschoolsd.Sprites-App-day-1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 840A805921E401D10010A5B5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4L7P3ZX586; + INFOPLIST_FILE = "Sprites App day 1/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.lambdaschoolsd.Sprites-App-day-1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 840A804021E401D00010A5B5 /* Build configuration list for PBXProject "Sprites App day 1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 840A805521E401D10010A5B5 /* Debug */, + 840A805621E401D10010A5B5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 840A805721E401D10010A5B5 /* Build configuration list for PBXNativeTarget "Sprites App day 1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 840A805821E401D10010A5B5 /* Debug */, + 840A805921E401D10010A5B5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 840A803D21E401D00010A5B5 /* Project object */; +} diff --git a/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..065ac37 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..fc00256 Binary files /dev/null and b/Sprites App day 1/Sprites App day 1.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sprites App day 1/Sprites App day 1.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist b/Sprites App day 1/Sprites App day 1.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..4df7c48 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Sprites App day 1.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Sprites App day 1/Sprites App day 1/AppDelegate.swift b/Sprites App day 1/Sprites App day 1/AppDelegate.swift new file mode 100644 index 0000000..5c58587 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Sprites App day 1 +// +// Created by Lambda_School_Loaner_18 on 1/7/19. +// Copyright © 2019 SeanDoyle. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: 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/Sprites App day 1/Sprites App day 1/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprites App day 1/Sprites App day 1/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/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/Sprites App day 1/Sprites App day 1/Assets.xcassets/Contents.json b/Sprites App day 1/Sprites App day 1/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprites App day 1/Sprites App day 1/Base.lproj/LaunchScreen.storyboard b/Sprites App day 1/Sprites App day 1/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites App day 1/Sprites App day 1/Base.lproj/Main.storyboard b/Sprites App day 1/Sprites App day 1/Base.lproj/Main.storyboard new file mode 100644 index 0000000..978c57f --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites App day 1/Sprites App day 1/CustomScene.swift b/Sprites App day 1/Sprites App day 1/CustomScene.swift new file mode 100644 index 0000000..77c5286 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/CustomScene.swift @@ -0,0 +1,15 @@ +import UIKit +import SpriteKit + +class CustomScene: SKScene { + public override func touchesBegan(_ touches: Set, with event: UIEvent?) { + guard !touches.isEmpty, let touch = touches.first + else { return } + + // Work with your touch here + let node = SKShapeNode(circleOfRadius: 8) + node.fillColor = .random() + node.position = touch.location(in: self) + addChild(node) + } +} diff --git a/Sprites App day 1/Sprites App day 1/Info.plist b/Sprites App day 1/Sprites App day 1/Info.plist new file mode 100644 index 0000000..89d7858 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/Info.plist @@ -0,0 +1,43 @@ + + + + + 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 + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprites App day 1/Sprites App day 1/RandomColor.swift b/Sprites App day 1/Sprites App day 1/RandomColor.swift new file mode 100644 index 0000000..09a178f --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/RandomColor.swift @@ -0,0 +1,18 @@ +import Foundation +import SpriteKit +import UIKit + +extension CGFloat { + static func random() -> CGFloat { + return CGFloat(arc4random()) / CGFloat(UInt32.max) + } +} + +extension UIColor { + static func random() -> UIColor { + return UIColor(red: .random(), + green: .random(), + blue: .random(), + alpha: 1.0) + } +} diff --git a/Sprites App day 1/Sprites App day 1/ViewController.swift b/Sprites App day 1/Sprites App day 1/ViewController.swift new file mode 100644 index 0000000..78b9e97 --- /dev/null +++ b/Sprites App day 1/Sprites App day 1/ViewController.swift @@ -0,0 +1,18 @@ +import UIKit +import SpriteKit + +class ViewController: UIViewController { + + @IBOutlet weak var skview: SKView! + + var skscene: CustomScene? = nil + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + skscene = CustomScene(size: view.bounds.size) + skview.presentScene(skscene) + } + + +} +