diff --git a/List/List.xcodeproj/project.pbxproj b/List/List.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e30433d --- /dev/null +++ b/List/List.xcodeproj/project.pbxproj @@ -0,0 +1,353 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 776C031A21E58ABC00A85378 /* List-Test.txt in Resources */ = {isa = PBXBuildFile; fileRef = 776C031921E58ABC00A85378 /* List-Test.txt */; }; + 7794FA9521E53E8900671BEC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7794FA9421E53E8900671BEC /* AppDelegate.swift */; }; + 7794FA9721E53E8900671BEC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7794FA9621E53E8900671BEC /* ViewController.swift */; }; + 7794FA9A21E53E8900671BEC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7794FA9821E53E8900671BEC /* Main.storyboard */; }; + 7794FA9C21E53E8900671BEC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7794FA9B21E53E8900671BEC /* Assets.xcassets */; }; + 7794FA9F21E53E8900671BEC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7794FA9D21E53E8900671BEC /* LaunchScreen.storyboard */; }; + 7794FAA721E53EE500671BEC /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7794FAA621E53EE500671BEC /* Item.swift */; }; + 7794FAA921E53F1500671BEC /* ItemsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7794FAA821E53F1500671BEC /* ItemsController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 776C031921E58ABC00A85378 /* List-Test.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "List-Test.txt"; sourceTree = ""; }; + 7794FA9121E53E8900671BEC /* List.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = List.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7794FA9421E53E8900671BEC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7794FA9621E53E8900671BEC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7794FA9921E53E8900671BEC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7794FA9B21E53E8900671BEC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7794FA9E21E53E8900671BEC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 7794FAA021E53E8900671BEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7794FAA621E53EE500671BEC /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = ""; }; + 7794FAA821E53F1500671BEC /* ItemsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemsController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7794FA8E21E53E8900671BEC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7794FA8821E53E8900671BEC = { + isa = PBXGroup; + children = ( + 7794FA9321E53E8900671BEC /* List */, + 7794FA9221E53E8900671BEC /* Products */, + 776C031921E58ABC00A85378 /* List-Test.txt */, + ); + sourceTree = ""; + }; + 7794FA9221E53E8900671BEC /* Products */ = { + isa = PBXGroup; + children = ( + 7794FA9121E53E8900671BEC /* List.app */, + ); + name = Products; + sourceTree = ""; + }; + 7794FA9321E53E8900671BEC /* List */ = { + isa = PBXGroup; + children = ( + 7794FA9421E53E8900671BEC /* AppDelegate.swift */, + 7794FAA621E53EE500671BEC /* Item.swift */, + 7794FAA821E53F1500671BEC /* ItemsController.swift */, + 7794FA9621E53E8900671BEC /* ViewController.swift */, + 7794FA9821E53E8900671BEC /* Main.storyboard */, + 7794FA9B21E53E8900671BEC /* Assets.xcassets */, + 7794FA9D21E53E8900671BEC /* LaunchScreen.storyboard */, + 7794FAA021E53E8900671BEC /* Info.plist */, + ); + path = List; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7794FA9021E53E8900671BEC /* List */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7794FAA321E53E8900671BEC /* Build configuration list for PBXNativeTarget "List" */; + buildPhases = ( + 7794FA8D21E53E8900671BEC /* Sources */, + 7794FA8E21E53E8900671BEC /* Frameworks */, + 7794FA8F21E53E8900671BEC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = List; + productName = List; + productReference = 7794FA9121E53E8900671BEC /* List.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7794FA8921E53E8900671BEC /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Nathanael Youngren"; + TargetAttributes = { + 7794FA9021E53E8900671BEC = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 7794FA8C21E53E8900671BEC /* Build configuration list for PBXProject "List" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7794FA8821E53E8900671BEC; + productRefGroup = 7794FA9221E53E8900671BEC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7794FA9021E53E8900671BEC /* List */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7794FA8F21E53E8900671BEC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7794FA9F21E53E8900671BEC /* LaunchScreen.storyboard in Resources */, + 7794FA9C21E53E8900671BEC /* Assets.xcassets in Resources */, + 776C031A21E58ABC00A85378 /* List-Test.txt in Resources */, + 7794FA9A21E53E8900671BEC /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7794FA8D21E53E8900671BEC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7794FA9721E53E8900671BEC /* ViewController.swift in Sources */, + 7794FAA721E53EE500671BEC /* Item.swift in Sources */, + 7794FAA921E53F1500671BEC /* ItemsController.swift in Sources */, + 7794FA9521E53E8900671BEC /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7794FA9821E53E8900671BEC /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7794FA9921E53E8900671BEC /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 7794FA9D21E53E8900671BEC /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7794FA9E21E53E8900671BEC /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7794FAA121E53E8900671BEC /* 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; + }; + 7794FAA221E53E8900671BEC /* 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; + }; + 7794FAA421E53E8900671BEC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HBKK7B5HAP; + INFOPLIST_FILE = List/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nateyoungren.List; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7794FAA521E53E8900671BEC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HBKK7B5HAP; + INFOPLIST_FILE = List/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.nateyoungren.List; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7794FA8C21E53E8900671BEC /* Build configuration list for PBXProject "List" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7794FAA121E53E8900671BEC /* Debug */, + 7794FAA221E53E8900671BEC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7794FAA321E53E8900671BEC /* Build configuration list for PBXNativeTarget "List" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7794FAA421E53E8900671BEC /* Debug */, + 7794FAA521E53E8900671BEC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7794FA8921E53E8900671BEC /* Project object */; +} diff --git a/List/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/List/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1119a07 --- /dev/null +++ b/List/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/List/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/List/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/List/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/List/List.xcodeproj/project.xcworkspace/xcuserdata/nathanaelyoungren.xcuserdatad/UserInterfaceState.xcuserstate b/List/List.xcodeproj/project.xcworkspace/xcuserdata/nathanaelyoungren.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..e51ec44 Binary files /dev/null and b/List/List.xcodeproj/project.xcworkspace/xcuserdata/nathanaelyoungren.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/List/List.xcodeproj/xcuserdata/nathanaelyoungren.xcuserdatad/xcschemes/xcschememanagement.plist b/List/List.xcodeproj/xcuserdata/nathanaelyoungren.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..7c17791 --- /dev/null +++ b/List/List.xcodeproj/xcuserdata/nathanaelyoungren.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + List.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/List/List/AppDelegate.swift b/List/List/AppDelegate.swift new file mode 100644 index 0000000..cd0d80d --- /dev/null +++ b/List/List/AppDelegate.swift @@ -0,0 +1,22 @@ +// +// AppDelegate.swift +// List +// +// Created by Nathanael Youngren on 1/8/19. +// Copyright © 2019 Nathanael Youngren. 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 + } + +} diff --git a/List/List/Assets.xcassets/AppIcon.appiconset/Contents.json b/List/List/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/List/List/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/List/List/Assets.xcassets/Contents.json b/List/List/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/List/List/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/List/List/Base.lproj/LaunchScreen.storyboard b/List/List/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/List/List/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/List/List/Base.lproj/Main.storyboard b/List/List/Base.lproj/Main.storyboard new file mode 100644 index 0000000..960cdb8 --- /dev/null +++ b/List/List/Base.lproj/Main.storyboard @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/List/List/Info.plist b/List/List/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/List/List/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/List/List/Item.swift b/List/List/Item.swift new file mode 100644 index 0000000..0101435 --- /dev/null +++ b/List/List/Item.swift @@ -0,0 +1,13 @@ +// +// Item.swift +// List +// +// Created by Nathanael Youngren on 1/8/19. +// Copyright © 2019 Nathanael Youngren. All rights reserved. +// + +import Foundation + +struct Item { + var name: String +} diff --git a/List/List/ItemsController.swift b/List/List/ItemsController.swift new file mode 100644 index 0000000..e37b52f --- /dev/null +++ b/List/List/ItemsController.swift @@ -0,0 +1,21 @@ +// +// ItemsController.swift +// List +// +// Created by Nathanael Youngren on 1/8/19. +// Copyright © 2019 Nathanael Youngren. All rights reserved. +// + +import Foundation + +class ItemsController { + var items: [String] = [] + + func add(_ item: String) { + items.append(item) + } + + func resetItems() { + items.removeAll() + } +} diff --git a/List/List/ViewController.swift b/List/List/ViewController.swift new file mode 100644 index 0000000..89cfd8b --- /dev/null +++ b/List/List/ViewController.swift @@ -0,0 +1,41 @@ +// +// ViewController.swift +// List +// +// Created by Nathanael Youngren on 1/8/19. +// Copyright © 2019 Nathanael Youngren. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + itemsController.resetItems() + } + + @IBAction func shouldAdd(_ sender: UIButton) { + let text = textField.text ?? "" + if !text.isEmpty { + itemsController.add("\u{2022} \(text)") + } + textView.text = itemsController.items.joined(separator: "\n") + textField.text = "" + } + + @IBAction func shouldReset(_ sender: UIButton) { + itemsController.resetItems() + textView.text = "" + } + + @IBAction func shouldPrintList(_ sender: UIButton) { + print(itemsController.items.joined(separator: "\n")) + } + + let itemsController = ItemsController() + + @IBOutlet weak var textField: UITextField! + @IBOutlet weak var textView: UITextView! + +}