diff --git a/Branching Example Shopping List.png b/Branching Example Shopping List.png new file mode 100644 index 0000000..0925e08 Binary files /dev/null and b/Branching Example Shopping List.png differ diff --git a/Sprites/Sprites.xcodeproj/project.pbxproj b/Sprites/Sprites.xcodeproj/project.pbxproj new file mode 100644 index 0000000..76e3181 --- /dev/null +++ b/Sprites/Sprites.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + F8FDCF8A21911A4A00C4F55E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FDCF8921911A4A00C4F55E /* AppDelegate.swift */; }; + F8FDCF8C21911A4A00C4F55E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FDCF8B21911A4A00C4F55E /* ViewController.swift */; }; + F8FDCF8F21911A4A00C4F55E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8FDCF8D21911A4A00C4F55E /* Main.storyboard */; }; + F8FDCF9121911A4C00C4F55E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F8FDCF9021911A4C00C4F55E /* Assets.xcassets */; }; + F8FDCF9421911A4C00C4F55E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8FDCF9221911A4C00C4F55E /* LaunchScreen.storyboard */; }; + F8FDCF9C21911C9600C4F55E /* CustomScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FDCF9B21911C9600C4F55E /* CustomScene.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + F8FDCF8621911A4A00C4F55E /* Sprites.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sprites.app; sourceTree = BUILT_PRODUCTS_DIR; }; + F8FDCF8921911A4A00C4F55E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + F8FDCF8B21911A4A00C4F55E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + F8FDCF8E21911A4A00C4F55E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + F8FDCF9021911A4C00C4F55E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + F8FDCF9321911A4C00C4F55E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + F8FDCF9521911A4C00C4F55E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F8FDCF9B21911C9600C4F55E /* CustomScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomScene.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + F8FDCF8321911A4A00C4F55E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + F8FDCF7D21911A4A00C4F55E = { + isa = PBXGroup; + children = ( + F8FDCF8821911A4A00C4F55E /* Sprites */, + F8FDCF8721911A4A00C4F55E /* Products */, + ); + sourceTree = ""; + }; + F8FDCF8721911A4A00C4F55E /* Products */ = { + isa = PBXGroup; + children = ( + F8FDCF8621911A4A00C4F55E /* Sprites.app */, + ); + name = Products; + sourceTree = ""; + }; + F8FDCF8821911A4A00C4F55E /* Sprites */ = { + isa = PBXGroup; + children = ( + F8FDCF8921911A4A00C4F55E /* AppDelegate.swift */, + F8FDCF8B21911A4A00C4F55E /* ViewController.swift */, + F8FDCF8D21911A4A00C4F55E /* Main.storyboard */, + F8FDCF9B21911C9600C4F55E /* CustomScene.swift */, + F8FDCF9021911A4C00C4F55E /* Assets.xcassets */, + F8FDCF9221911A4C00C4F55E /* LaunchScreen.storyboard */, + F8FDCF9521911A4C00C4F55E /* Info.plist */, + ); + path = Sprites; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F8FDCF8521911A4A00C4F55E /* Sprites */ = { + isa = PBXNativeTarget; + buildConfigurationList = F8FDCF9821911A4C00C4F55E /* Build configuration list for PBXNativeTarget "Sprites" */; + buildPhases = ( + F8FDCF8221911A4A00C4F55E /* Sources */, + F8FDCF8321911A4A00C4F55E /* Frameworks */, + F8FDCF8421911A4A00C4F55E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Sprites; + productName = Sprites; + productReference = F8FDCF8621911A4A00C4F55E /* Sprites.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F8FDCF7E21911A4A00C4F55E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Jaspal Suri"; + TargetAttributes = { + F8FDCF8521911A4A00C4F55E = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = F8FDCF8121911A4A00C4F55E /* Build configuration list for PBXProject "Sprites" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = F8FDCF7D21911A4A00C4F55E; + productRefGroup = F8FDCF8721911A4A00C4F55E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F8FDCF8521911A4A00C4F55E /* Sprites */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F8FDCF8421911A4A00C4F55E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8FDCF9421911A4C00C4F55E /* LaunchScreen.storyboard in Resources */, + F8FDCF9121911A4C00C4F55E /* Assets.xcassets in Resources */, + F8FDCF8F21911A4A00C4F55E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + F8FDCF8221911A4A00C4F55E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8FDCF8C21911A4A00C4F55E /* ViewController.swift in Sources */, + F8FDCF8A21911A4A00C4F55E /* AppDelegate.swift in Sources */, + F8FDCF9C21911C9600C4F55E /* CustomScene.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + F8FDCF8D21911A4A00C4F55E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F8FDCF8E21911A4A00C4F55E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + F8FDCF9221911A4C00C4F55E /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F8FDCF9321911A4C00C4F55E /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + F8FDCF9621911A4C00C4F55E /* 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; + }; + F8FDCF9721911A4C00C4F55E /* 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; + }; + F8FDCF9921911A4C00C4F55E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 6Y6994DAGM; + INFOPLIST_FILE = Sprites/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.JaspalSuri.Sprites; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + F8FDCF9A21911A4C00C4F55E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 6Y6994DAGM; + INFOPLIST_FILE = Sprites/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.JaspalSuri.Sprites; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + F8FDCF8121911A4A00C4F55E /* Build configuration list for PBXProject "Sprites" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8FDCF9621911A4C00C4F55E /* Debug */, + F8FDCF9721911A4C00C4F55E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F8FDCF9821911A4C00C4F55E /* Build configuration list for PBXNativeTarget "Sprites" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8FDCF9921911A4C00C4F55E /* Debug */, + F8FDCF9A21911A4C00C4F55E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = F8FDCF7E21911A4A00C4F55E /* Project object */; +} diff --git a/Sprites/Sprites.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sprites/Sprites.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..842b16c --- /dev/null +++ b/Sprites/Sprites.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sprites/Sprites.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sprites/Sprites.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sprites/Sprites.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sprites/Sprites/AppDelegate.swift b/Sprites/Sprites/AppDelegate.swift new file mode 100644 index 0000000..a90a22e --- /dev/null +++ b/Sprites/Sprites/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Sprites +// +// Created by Jaspal on 11/5/18. +// Copyright © 2018 Jaspal Suri. 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/Sprites/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprites/Sprites/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Sprites/Sprites/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/Sprites/Assets.xcassets/Contents.json b/Sprites/Sprites/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Sprites/Sprites/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprites/Sprites/Base.lproj/LaunchScreen.storyboard b/Sprites/Sprites/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Sprites/Sprites/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites/Sprites/Base.lproj/Main.storyboard b/Sprites/Sprites/Base.lproj/Main.storyboard new file mode 100644 index 0000000..09ed035 --- /dev/null +++ b/Sprites/Sprites/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites/Sprites/CustomScene.swift b/Sprites/Sprites/CustomScene.swift new file mode 100644 index 0000000..1fc4bf8 --- /dev/null +++ b/Sprites/Sprites/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 = .red + node.position = touch.location(in: self) + addChild(node) + } +} diff --git a/Sprites/Sprites/Info.plist b/Sprites/Sprites/Info.plist new file mode 100644 index 0000000..89d7858 --- /dev/null +++ b/Sprites/Sprites/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/Sprites/ViewController.swift b/Sprites/Sprites/ViewController.swift new file mode 100644 index 0000000..75d02e8 --- /dev/null +++ b/Sprites/Sprites/ViewController.swift @@ -0,0 +1,16 @@ +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) + } +} + + diff --git a/free form questions - Day 1.md b/free form questions - Day 1.md new file mode 100644 index 0000000..e41e45e --- /dev/null +++ b/free form questions - Day 1.md @@ -0,0 +1,52 @@ +# Free Form Questions about Vesion Control, Xcode, etc. + +## Why do we use version control? Under what circumstances would you need version control features and why? + +Version control: + +1. Adds a Safety Net for rollbacks [Safety] + - Software can't be fixed like a bad haircut. + - Version control allows you to undo changes that you've pushed to the branch. + - Lets you go from one good snapshot to next good snapshot and skip the bad snapshot in-between. +2. Lets you collaborate [Coordination] + - Pick and choose changes from whomever you want to. + - They can each use different version of the same feature. +3. Lets you try things out before you commit to them (when developing new things) + - Exploring in a production environment seems necessary, but: + - Unsafe + - Could break the build + - Upsets coworker for obvious reasons and affect performance reviews. + - Can be quite [detrimental](https://about.gitlab.com/2017/02/01/gitlab-dot-com-database-incident/) to the company and/or its image, if it doesn't have a backup. + - But you need to: + - Share code/progress + - fix bugs + - add features + - get feedback + - i.e. design critiques + - Solution: Branching + - Branching isolates your work from the build. ![branching example of various shopping lists](branching example shopping list.png) + +## What are the navigator, editor, and inspectors areas in Xcode? What are their roles and how do you use them? + +### Navigator + +Allows you to go through the contents of a project, whether it's a file, or the items in an application view. + +### Editor + +Allows you to write code and add/modify UI objects for your application, as well as make connections between the two. + +### Inspectors + +Used to modify UI objects' appearance, such as the size of a button and its placeholder text. + +## How do you center a view in Interface Builder? How do you stretch one? + +You need to align the object with the lines that appear on the view that denote the horizontal and vertical center, as well as use the bar chart button on the bottom to make sure it stays centered. To stretch the object, you need to click and drag the white boxes that appear on the edge of it and then modify the object's shape as needed by stretching or shrinking it by pulling towards/away from that edge. + +## What is SpriteKit and why do people use it? + +According to Apple's developer documentation: +>The SpriteKit framework makes it easy to create high-performance, battery-efficient 2D games. With support for custom OpenGL ES shaders and lighting, integration with SceneKit, and advanced new physics effects and animations, you can add force fields, detect collisions, and generate new lighting effects in your games. + +This makes it easier to create responsive objects within a game. \ No newline at end of file