diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..33caedd Binary files /dev/null and b/.DS_Store differ diff --git a/List-Remake/List-Remake.xcodeproj/project.pbxproj b/List-Remake/List-Remake.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b29ec95 --- /dev/null +++ b/List-Remake/List-Remake.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 84004725219B845B005C8C80 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84004724219B845B005C8C80 /* AppDelegate.swift */; }; + 84004727219B845B005C8C80 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84004726219B845B005C8C80 /* ViewController.swift */; }; + 8400472A219B845C005C8C80 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84004728219B845C005C8C80 /* Main.storyboard */; }; + 8400472C219B845D005C8C80 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8400472B219B845D005C8C80 /* Assets.xcassets */; }; + 8400472F219B845D005C8C80 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8400472D219B845D005C8C80 /* LaunchScreen.storyboard */; }; + 84004737219B852F005C8C80 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84004736219B852F005C8C80 /* Model.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 84004721219B845B005C8C80 /* List-Remake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "List-Remake.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 84004724219B845B005C8C80 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 84004726219B845B005C8C80 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 84004729219B845C005C8C80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8400472B219B845D005C8C80 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8400472E219B845D005C8C80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 84004730219B845D005C8C80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 84004736219B852F005C8C80 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8400471E219B845B005C8C80 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84004718219B845B005C8C80 = { + isa = PBXGroup; + children = ( + 84004723219B845B005C8C80 /* List-Remake */, + 84004722219B845B005C8C80 /* Products */, + ); + sourceTree = ""; + }; + 84004722219B845B005C8C80 /* Products */ = { + isa = PBXGroup; + children = ( + 84004721219B845B005C8C80 /* List-Remake.app */, + ); + name = Products; + sourceTree = ""; + }; + 84004723219B845B005C8C80 /* List-Remake */ = { + isa = PBXGroup; + children = ( + 84004724219B845B005C8C80 /* AppDelegate.swift */, + 84004726219B845B005C8C80 /* ViewController.swift */, + 84004736219B852F005C8C80 /* Model.swift */, + 84004728219B845C005C8C80 /* Main.storyboard */, + 8400472B219B845D005C8C80 /* Assets.xcassets */, + 8400472D219B845D005C8C80 /* LaunchScreen.storyboard */, + 84004730219B845D005C8C80 /* Info.plist */, + ); + path = "List-Remake"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84004720219B845B005C8C80 /* List-Remake */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84004733219B845D005C8C80 /* Build configuration list for PBXNativeTarget "List-Remake" */; + buildPhases = ( + 8400471D219B845B005C8C80 /* Sources */, + 8400471E219B845B005C8C80 /* Frameworks */, + 8400471F219B845B005C8C80 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "List-Remake"; + productName = "List-Remake"; + productReference = 84004721219B845B005C8C80 /* List-Remake.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84004719219B845B005C8C80 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = Lambda_School_Loaner_18; + TargetAttributes = { + 84004720219B845B005C8C80 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 8400471C219B845B005C8C80 /* Build configuration list for PBXProject "List-Remake" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 84004718219B845B005C8C80; + productRefGroup = 84004722219B845B005C8C80 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84004720219B845B005C8C80 /* List-Remake */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8400471F219B845B005C8C80 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8400472F219B845D005C8C80 /* LaunchScreen.storyboard in Resources */, + 8400472C219B845D005C8C80 /* Assets.xcassets in Resources */, + 8400472A219B845C005C8C80 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8400471D219B845B005C8C80 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84004737219B852F005C8C80 /* Model.swift in Sources */, + 84004727219B845B005C8C80 /* ViewController.swift in Sources */, + 84004725219B845B005C8C80 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84004728219B845C005C8C80 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84004729219B845C005C8C80 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8400472D219B845D005C8C80 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8400472E219B845D005C8C80 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84004731219B845D005C8C80 /* 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; + }; + 84004732219B845D005C8C80 /* 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; + }; + 84004734219B845D005C8C80 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4L7P3ZX586; + INFOPLIST_FILE = "List-Remake/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.lambdaschoolsd.List-Remake"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 84004735219B845D005C8C80 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4L7P3ZX586; + INFOPLIST_FILE = "List-Remake/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.lambdaschoolsd.List-Remake"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8400471C219B845B005C8C80 /* Build configuration list for PBXProject "List-Remake" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84004731219B845D005C8C80 /* Debug */, + 84004732219B845D005C8C80 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84004733219B845D005C8C80 /* Build configuration list for PBXNativeTarget "List-Remake" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84004734219B845D005C8C80 /* Debug */, + 84004735219B845D005C8C80 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84004719219B845B005C8C80 /* Project object */; +} diff --git a/List-Remake/List-Remake.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0592f88 --- /dev/null +++ b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..c9b451e Binary files /dev/null and b/List-Remake/List-Remake.xcodeproj/project.xcworkspace/xcuserdata/lambda_school_loaner_18.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/List-Remake/List-Remake.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist b/List-Remake/List-Remake.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..b38a631 --- /dev/null +++ b/List-Remake/List-Remake.xcodeproj/xcuserdata/lambda_school_loaner_18.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + List-Remake.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/List-Remake/List-Remake/AppDelegate.swift b/List-Remake/List-Remake/AppDelegate.swift new file mode 100644 index 0000000..ccea589 --- /dev/null +++ b/List-Remake/List-Remake/AppDelegate.swift @@ -0,0 +1,14 @@ +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-Remake/List-Remake/Assets.xcassets/AppIcon.appiconset/Contents.json b/List-Remake/List-Remake/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/List-Remake/List-Remake/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-Remake/List-Remake/Assets.xcassets/Contents.json b/List-Remake/List-Remake/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/List-Remake/List-Remake/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/List-Remake/List-Remake/Base.lproj/LaunchScreen.storyboard b/List-Remake/List-Remake/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/List-Remake/List-Remake/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/List-Remake/List-Remake/Base.lproj/Main.storyboard b/List-Remake/List-Remake/Base.lproj/Main.storyboard new file mode 100644 index 0000000..c8f6d53 --- /dev/null +++ b/List-Remake/List-Remake/Base.lproj/Main.storyboard @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/List-Remake/List-Remake/Info.plist b/List-Remake/List-Remake/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/List-Remake/List-Remake/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-Remake/List-Remake/Model.swift b/List-Remake/List-Remake/Model.swift new file mode 100644 index 0000000..4991e6e --- /dev/null +++ b/List-Remake/List-Remake/Model.swift @@ -0,0 +1,17 @@ +import Foundation + +class Model { + static let shared = Model() + private init () {} + + private(set) var items: [String] = [] + + func add(_ item: String) { + items.append(item) + } + + func resetItems() { + // reset list here + items.removeAll() + } +} diff --git a/List-Remake/List-Remake/ViewController.swift b/List-Remake/List-Remake/ViewController.swift new file mode 100644 index 0000000..a08cb8d --- /dev/null +++ b/List-Remake/List-Remake/ViewController.swift @@ -0,0 +1,38 @@ +import UIKit + +class ViewController: UIViewController { + + @IBOutlet weak var textField: UITextField! + + @IBOutlet weak var label: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + updateViews() + } + + @IBAction func shouldAdd(_ sender: Any) { + guard let text = textField.text, !text.isEmpty else { return } + Model.shared.add(text) + updateViews() + } + + @IBAction func shouldReset(_ sender: Any) { + Model.shared.resetItems() + label.text = "" + + } + private func updateViews() { + let joined = Model.shared.items.joined(separator: "\n") + label.text = joined + } + + @IBAction func shouldPrint(_ sender: Any) { + print(Model.shared.items) + } + + +} + + + diff --git a/README.md b/README.md index a100510..3dba3de 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Module Challenge: View Controllers and the Model-View-Controller Design Pattern - List - +. This challenge allows you to practice the concepts and techniques learned in today's guided lesson and apply them in a concrete project. Your lesson explored the view controller, IB's object library, and Model-View-Controller. You will demonstrate proficiency by creating an application that showcases the same features you learned in class. ## Instructions @@ -117,4 +117,4 @@ After finishing your required elements, push your work further. These goals may - Add a second button at the bottom that prints out your list to the debugging console using `print` statements. - Add bullets to each item in your list. -- Replace the text field in your project with a non-editable text view so your list can be top-aligned. \ No newline at end of file +- Replace the text field in your project with a non-editable text view so your list can be top-aligned. diff --git a/answers.txt b/answers.txt new file mode 100644 index 0000000..b2ec34e --- /dev/null +++ b/answers.txt @@ -0,0 +1,14 @@ +What is Interface Builder's object library? +Where UI items are stored that can be used on storyboards + +What is the difference between an outlet and an action? +Action triggers code to be run. + +What is the role of a View Controller? +To control outlets and actions. + +What is Model-View-Controller? +Model has the code, controller tells when to show it on the view. + +Why use Model-View-Controller? +So you can use your code in different places. \ No newline at end of file