From 8fe8527c5faae70ef673f6bb8209d3fa0730238e Mon Sep 17 00:00:00 2001 From: Vijay Das Date: Mon, 7 Jan 2019 15:41:27 -0600 Subject: [PATCH 1/3] add Xcode project --- Sprites/Sprites.xcodeproj/project.pbxproj | 341 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Sprites/Sprites/AppDelegate.swift | 46 +++ .../AppIcon.appiconset/Contents.json | 98 +++++ Sprites/Sprites/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ Sprites/Sprites/Base.lproj/Main.storyboard | 24 ++ Sprites/Sprites/Info.plist | 45 +++ Sprites/Sprites/ViewController.swift | 20 + 10 files changed, 620 insertions(+) create mode 100644 Sprites/Sprites.xcodeproj/project.pbxproj create mode 100644 Sprites/Sprites.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Sprites/Sprites.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Sprites/Sprites/AppDelegate.swift create mode 100644 Sprites/Sprites/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprites/Sprites/Assets.xcassets/Contents.json create mode 100644 Sprites/Sprites/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprites/Sprites/Base.lproj/Main.storyboard create mode 100644 Sprites/Sprites/Info.plist create mode 100644 Sprites/Sprites/ViewController.swift diff --git a/Sprites/Sprites.xcodeproj/project.pbxproj b/Sprites/Sprites.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f2048f5 --- /dev/null +++ b/Sprites/Sprites.xcodeproj/project.pbxproj @@ -0,0 +1,341 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 27105C8921E3FEBB002CAE01 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27105C8821E3FEBB002CAE01 /* AppDelegate.swift */; }; + 27105C8B21E3FEBB002CAE01 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27105C8A21E3FEBB002CAE01 /* ViewController.swift */; }; + 27105C8E21E3FEBB002CAE01 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27105C8C21E3FEBB002CAE01 /* Main.storyboard */; }; + 27105C9021E3FEBC002CAE01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */; }; + 27105C9321E3FEBC002CAE01 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27105C9121E3FEBC002CAE01 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 27105C8521E3FEBB002CAE01 /* Sprites.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sprites.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 27105C8821E3FEBB002CAE01 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 27105C8A21E3FEBB002CAE01 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 27105C8D21E3FEBB002CAE01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 27105C9221E3FEBC002CAE01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 27105C9421E3FEBC002CAE01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 27105C8221E3FEBB002CAE01 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27105C7C21E3FEBB002CAE01 = { + isa = PBXGroup; + children = ( + 27105C8721E3FEBB002CAE01 /* Sprites */, + 27105C8621E3FEBB002CAE01 /* Products */, + ); + sourceTree = ""; + }; + 27105C8621E3FEBB002CAE01 /* Products */ = { + isa = PBXGroup; + children = ( + 27105C8521E3FEBB002CAE01 /* Sprites.app */, + ); + name = Products; + sourceTree = ""; + }; + 27105C8721E3FEBB002CAE01 /* Sprites */ = { + isa = PBXGroup; + children = ( + 27105C8821E3FEBB002CAE01 /* AppDelegate.swift */, + 27105C8A21E3FEBB002CAE01 /* ViewController.swift */, + 27105C8C21E3FEBB002CAE01 /* Main.storyboard */, + 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */, + 27105C9121E3FEBC002CAE01 /* LaunchScreen.storyboard */, + 27105C9421E3FEBC002CAE01 /* Info.plist */, + ); + path = Sprites; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 27105C8421E3FEBB002CAE01 /* Sprites */ = { + isa = PBXNativeTarget; + buildConfigurationList = 27105C9721E3FEBC002CAE01 /* Build configuration list for PBXNativeTarget "Sprites" */; + buildPhases = ( + 27105C8121E3FEBB002CAE01 /* Sources */, + 27105C8221E3FEBB002CAE01 /* Frameworks */, + 27105C8321E3FEBB002CAE01 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Sprites; + productName = Sprites; + productReference = 27105C8521E3FEBB002CAE01 /* Sprites.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 27105C7D21E3FEBB002CAE01 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Vijay Das"; + TargetAttributes = { + 27105C8421E3FEBB002CAE01 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 27105C8021E3FEBB002CAE01 /* Build configuration list for PBXProject "Sprites" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 27105C7C21E3FEBB002CAE01; + productRefGroup = 27105C8621E3FEBB002CAE01 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 27105C8421E3FEBB002CAE01 /* Sprites */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 27105C8321E3FEBB002CAE01 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27105C9321E3FEBC002CAE01 /* LaunchScreen.storyboard in Resources */, + 27105C9021E3FEBC002CAE01 /* Assets.xcassets in Resources */, + 27105C8E21E3FEBB002CAE01 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 27105C8121E3FEBB002CAE01 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27105C8B21E3FEBB002CAE01 /* ViewController.swift in Sources */, + 27105C8921E3FEBB002CAE01 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 27105C8C21E3FEBB002CAE01 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 27105C8D21E3FEBB002CAE01 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 27105C9121E3FEBC002CAE01 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 27105C9221E3FEBC002CAE01 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 27105C9521E3FEBC002CAE01 /* 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; + }; + 27105C9621E3FEBC002CAE01 /* 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; + }; + 27105C9821E3FEBC002CAE01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = F29U3VL727; + INFOPLIST_FILE = Sprites/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = vijaydas.Sprites; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 27105C9921E3FEBC002CAE01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = F29U3VL727; + INFOPLIST_FILE = Sprites/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = vijaydas.Sprites; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 27105C8021E3FEBB002CAE01 /* Build configuration list for PBXProject "Sprites" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27105C9521E3FEBC002CAE01 /* Debug */, + 27105C9621E3FEBC002CAE01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 27105C9721E3FEBC002CAE01 /* Build configuration list for PBXNativeTarget "Sprites" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27105C9821E3FEBC002CAE01 /* Debug */, + 27105C9921E3FEBC002CAE01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 27105C7D21E3FEBB002CAE01 /* 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..1365342 --- /dev/null +++ b/Sprites/Sprites/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Sprites +// +// Created by Vijay Das on 1/7/19. +// Copyright © 2019 Vijay Das. 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..f1bcf38 --- /dev/null +++ b/Sprites/Sprites/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites/Sprites/Info.plist b/Sprites/Sprites/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/Sprites/Sprites/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/Sprites/Sprites/ViewController.swift b/Sprites/Sprites/ViewController.swift new file mode 100644 index 0000000..ca86f88 --- /dev/null +++ b/Sprites/Sprites/ViewController.swift @@ -0,0 +1,20 @@ +// +// ViewController.swift +// Sprites +// +// Created by Vijay Das on 1/7/19. +// Copyright © 2019 Vijay Das. 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. + } + + +} + From e4cdf914a450bbc714a940042ef2485b1e50d5bd Mon Sep 17 00:00:00 2001 From: Vijay Das Date: Mon, 7 Jan 2019 17:27:36 -0600 Subject: [PATCH 2/3] Add basic MVP function --- Sprites/Sprites.xcodeproj/project.pbxproj | 4 ++++ Sprites/Sprites/Base.lproj/Main.storyboard | 24 +++++++++++++++++++--- Sprites/Sprites/CustomScene.swift | 22 ++++++++++++++++++++ Sprites/Sprites/ViewController.swift | 13 +++++++----- 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 Sprites/Sprites/CustomScene.swift diff --git a/Sprites/Sprites.xcodeproj/project.pbxproj b/Sprites/Sprites.xcodeproj/project.pbxproj index f2048f5..29ebd6d 100644 --- a/Sprites/Sprites.xcodeproj/project.pbxproj +++ b/Sprites/Sprites.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 27105C8E21E3FEBB002CAE01 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27105C8C21E3FEBB002CAE01 /* Main.storyboard */; }; 27105C9021E3FEBC002CAE01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */; }; 27105C9321E3FEBC002CAE01 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27105C9121E3FEBC002CAE01 /* LaunchScreen.storyboard */; }; + 27171AA821E416D8009D1AC3 /* CustomScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27171AA721E416D8009D1AC3 /* CustomScene.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -22,6 +23,7 @@ 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27105C9221E3FEBC002CAE01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27105C9421E3FEBC002CAE01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 27171AA721E416D8009D1AC3 /* CustomScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomScene.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,6 +58,7 @@ children = ( 27105C8821E3FEBB002CAE01 /* AppDelegate.swift */, 27105C8A21E3FEBB002CAE01 /* ViewController.swift */, + 27171AA721E416D8009D1AC3 /* CustomScene.swift */, 27105C8C21E3FEBB002CAE01 /* Main.storyboard */, 27105C8F21E3FEBC002CAE01 /* Assets.xcassets */, 27105C9121E3FEBC002CAE01 /* LaunchScreen.storyboard */, @@ -137,6 +140,7 @@ files = ( 27105C8B21E3FEBB002CAE01 /* ViewController.swift in Sources */, 27105C8921E3FEBB002CAE01 /* AppDelegate.swift in Sources */, + 27171AA821E416D8009D1AC3 /* CustomScene.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sprites/Sprites/Base.lproj/Main.storyboard b/Sprites/Sprites/Base.lproj/Main.storyboard index f1bcf38..ea4d400 100644 --- a/Sprites/Sprites/Base.lproj/Main.storyboard +++ b/Sprites/Sprites/Base.lproj/Main.storyboard @@ -1,7 +1,11 @@ - + + + + - + + @@ -9,13 +13,27 @@ - + + + + + + + + + + + + + + + diff --git a/Sprites/Sprites/CustomScene.swift b/Sprites/Sprites/CustomScene.swift new file mode 100644 index 0000000..630a3b0 --- /dev/null +++ b/Sprites/Sprites/CustomScene.swift @@ -0,0 +1,22 @@ +// +// CustomScene.swift +// Sprites +// +// Created by Vijay Das on 1/7/19. +// Copyright © 2019 Vijay Das. All rights reserved. +// + +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 } + + let node = SKShapeNode(circleOfRadius: 8) + node.fillColor = .red + node.position = touch.location(in: self) + addChild(node) + } +} diff --git a/Sprites/Sprites/ViewController.swift b/Sprites/Sprites/ViewController.swift index ca86f88..12cbdea 100644 --- a/Sprites/Sprites/ViewController.swift +++ b/Sprites/Sprites/ViewController.swift @@ -7,14 +7,17 @@ // import UIKit +import SpriteKit class ViewController: UIViewController { - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + skscene = CustomScene(size: view.bounds.size) + skview.presentScene(skscene) } - + @IBOutlet var skview: SKView! + + var skscene: CustomScene? = nil } - From 64c6714673ce3f599df505503722dda08faea734 Mon Sep 17 00:00:00 2001 From: Vijay Das Date: Mon, 7 Jan 2019 17:57:45 -0600 Subject: [PATCH 3/3] Add questions --- Sprites/Questions.rtf | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Sprites/Questions.rtf diff --git a/Sprites/Questions.rtf b/Sprites/Questions.rtf new file mode 100644 index 0000000..13beea8 --- /dev/null +++ b/Sprites/Questions.rtf @@ -0,0 +1,49 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf200 +{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;\f1\fnil\fcharset0 HelveticaNeue-Bold;} +{\colortbl;\red255\green255\blue255;\red27\green31\blue34;\red255\green255\blue255;\red10\green77\blue204; +} +{\*\expandedcolortbl;;\cssrgb\c14118\c16078\c18039;\cssrgb\c100000\c100000\c100000;\cssrgb\c1176\c40000\c83922; +} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1} +{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} +{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3} +{\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid4}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}} +\margl1440\margr1440\vieww10800\viewh8400\viewkind0 +\deftab720 +\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0 +\ls1\ilvl0 +\f0\fs32 \cf2 \cb3 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0 +Why do we use version control? Under what circumstances would you need version control features and why?\ +\pard\tx720\pardeftab720\partightenfactor0 +\cf2 We use version control to maintain code in an organize manner across organizations and release cycles. Version control features are critical for collaboration and maintaining and updating code.\ +\pard\tx720\pardeftab720\partightenfactor0 +\cf2 \cb1 \ +\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0 +\ls2\ilvl0\cf2 \cb3 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0 +What are the navigator, editor, and inspectors areas in Xcode? What are their roles and how do you use them?\ +\pard\tx720\pardeftab720\partightenfactor0 +\cf2 \cb1 These are the three major working areas in an Xcode project window.\ +1) The Navigator gives a set of several navigators for the project which include: File, Version, Hierarchy, Search, Issues, Tests, Debug, Breakpoints, and Builds.\ +2) The Editor area is the area that displays code files or the Interface builder.\ +3) The Inspector area gives access to all the features that can be set for any Interface Builder view.\ +\ +\ +\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0 +\ls3\ilvl0\cf2 \cb3 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0 +How do you center a view in Interface Builder? How do you stretch one?\ +\pard\tx720\pardeftab720\partightenfactor0 +\cf2 To center a view, select the view and mouse over the \'93Add New Constraints\'94 area below the IB window. Here you can select both Horizontal and Vertical in Container and click add constraints.\ +\ +To stretch to desired dimension: select view and go to \'93Tie Fighter\'94. Here set the spacing constraints for the four sides as desired and add constraints.\cb1 \ +\ +\ +\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0 +\ls4\ilvl0\cf2 \cb3 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0 +What is SpriteKit and why do people use it?\ +\pard\tx720\pardeftab720\partightenfactor0 +\cf2 \cb1 SpriteKit is an iOS framework for building 2D views in apps. It provides a set of code libraries, objects and functions for creating, displaying and animating 2D elements, called nodes.\ +\pard\pardeftab720\partightenfactor0 + +\f1\b\fs48 \cf4 \ +} \ No newline at end of file