diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ad4aae3 Binary files /dev/null and b/.DS_Store differ diff --git a/MarsWater/.DS_Store b/MarsWater/.DS_Store new file mode 100644 index 0000000..f23fca9 Binary files /dev/null and b/MarsWater/.DS_Store differ diff --git a/MarsWater/MarsWater.xcodeproj/project.pbxproj b/MarsWater/MarsWater.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0e42739 --- /dev/null +++ b/MarsWater/MarsWater.xcodeproj/project.pbxproj @@ -0,0 +1,374 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5A715E551BC1AE3B0055F61D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E541BC1AE3B0055F61D /* main.m */; }; + 5A715E581BC1AE3B0055F61D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E571BC1AE3B0055F61D /* AppDelegate.m */; }; + 5A715E5E1BC1AE3B0055F61D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5A715E5C1BC1AE3B0055F61D /* Main.storyboard */; }; + 5A715E611BC1AE3B0055F61D /* MarsWater.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E5F1BC1AE3B0055F61D /* MarsWater.xcdatamodeld */; }; + 5A715E631BC1AE3B0055F61D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5A715E621BC1AE3B0055F61D /* Assets.xcassets */; }; + 5A715E661BC1AE3B0055F61D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5A715E641BC1AE3B0055F61D /* LaunchScreen.storyboard */; }; + 5A715E7C1BC1B9100055F61D /* ListTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E7B1BC1B9100055F61D /* ListTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 5A715E7F1BC1B9500055F61D /* ListCreationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E7E1BC1B9500055F61D /* ListCreationTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 5A715E881BC1C4030055F61D /* Task+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E811BC1C4030055F61D /* Task+CoreDataProperties.m */; settings = {ASSET_TAGS = (); }; }; + 5A715E891BC1C4030055F61D /* Task.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E831BC1C4030055F61D /* Task.m */; settings = {ASSET_TAGS = (); }; }; + 5A715E8A1BC1C4030055F61D /* List+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E851BC1C4030055F61D /* List+CoreDataProperties.m */; settings = {ASSET_TAGS = (); }; }; + 5A715E8B1BC1C4030055F61D /* List.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A715E871BC1C4030055F61D /* List.m */; settings = {ASSET_TAGS = (); }; }; + 5AE2247C1BC8A6D5004AEB77 /* TaskTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AE2247B1BC8A6D5004AEB77 /* TaskTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 5AE2247F1BC8A76D004AEB77 /* TaskCreateTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AE2247E1BC8A76D004AEB77 /* TaskCreateTableViewController.m */; settings = {ASSET_TAGS = (); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 5A715E501BC1AE3B0055F61D /* MarsWater.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MarsWater.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5A715E541BC1AE3B0055F61D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 5A715E561BC1AE3B0055F61D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 5A715E571BC1AE3B0055F61D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 5A715E5D1BC1AE3B0055F61D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 5A715E601BC1AE3B0055F61D /* MarsWater.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MarsWater.xcdatamodel; sourceTree = ""; }; + 5A715E621BC1AE3B0055F61D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5A715E651BC1AE3B0055F61D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 5A715E671BC1AE3B0055F61D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5A715E7A1BC1B9100055F61D /* ListTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListTableViewController.h; sourceTree = ""; }; + 5A715E7B1BC1B9100055F61D /* ListTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListTableViewController.m; sourceTree = ""; }; + 5A715E7D1BC1B9500055F61D /* ListCreationTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListCreationTableViewController.h; sourceTree = ""; }; + 5A715E7E1BC1B9500055F61D /* ListCreationTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListCreationTableViewController.m; sourceTree = ""; }; + 5A715E801BC1C4030055F61D /* Task+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Task+CoreDataProperties.h"; sourceTree = ""; }; + 5A715E811BC1C4030055F61D /* Task+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Task+CoreDataProperties.m"; sourceTree = ""; }; + 5A715E821BC1C4030055F61D /* Task.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Task.h; sourceTree = ""; }; + 5A715E831BC1C4030055F61D /* Task.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Task.m; sourceTree = ""; }; + 5A715E841BC1C4030055F61D /* List+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "List+CoreDataProperties.h"; sourceTree = ""; }; + 5A715E851BC1C4030055F61D /* List+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "List+CoreDataProperties.m"; sourceTree = ""; }; + 5A715E861BC1C4030055F61D /* List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = List.h; sourceTree = ""; }; + 5A715E871BC1C4030055F61D /* List.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = List.m; sourceTree = ""; }; + 5AE2247A1BC8A6D5004AEB77 /* TaskTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskTableViewController.h; sourceTree = ""; }; + 5AE2247B1BC8A6D5004AEB77 /* TaskTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskTableViewController.m; sourceTree = ""; }; + 5AE2247D1BC8A76D004AEB77 /* TaskCreateTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskCreateTableViewController.h; sourceTree = ""; }; + 5AE2247E1BC8A76D004AEB77 /* TaskCreateTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskCreateTableViewController.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5A715E4D1BC1AE3B0055F61D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5A715E471BC1AE3A0055F61D = { + isa = PBXGroup; + children = ( + 5A715E521BC1AE3B0055F61D /* MarsWater */, + 5A715E511BC1AE3B0055F61D /* Products */, + ); + sourceTree = ""; + }; + 5A715E511BC1AE3B0055F61D /* Products */ = { + isa = PBXGroup; + children = ( + 5A715E501BC1AE3B0055F61D /* MarsWater.app */, + ); + name = Products; + sourceTree = ""; + }; + 5A715E521BC1AE3B0055F61D /* MarsWater */ = { + isa = PBXGroup; + children = ( + 5A715E8C1BC1C4140055F61D /* Model */, + 5A715E561BC1AE3B0055F61D /* AppDelegate.h */, + 5A715E571BC1AE3B0055F61D /* AppDelegate.m */, + 5A715E7A1BC1B9100055F61D /* ListTableViewController.h */, + 5A715E7B1BC1B9100055F61D /* ListTableViewController.m */, + 5A715E7D1BC1B9500055F61D /* ListCreationTableViewController.h */, + 5A715E7E1BC1B9500055F61D /* ListCreationTableViewController.m */, + 5AE2247A1BC8A6D5004AEB77 /* TaskTableViewController.h */, + 5AE2247B1BC8A6D5004AEB77 /* TaskTableViewController.m */, + 5AE2247D1BC8A76D004AEB77 /* TaskCreateTableViewController.h */, + 5AE2247E1BC8A76D004AEB77 /* TaskCreateTableViewController.m */, + 5A715E5C1BC1AE3B0055F61D /* Main.storyboard */, + 5A715E621BC1AE3B0055F61D /* Assets.xcassets */, + 5A715E641BC1AE3B0055F61D /* LaunchScreen.storyboard */, + 5A715E671BC1AE3B0055F61D /* Info.plist */, + 5A715E5F1BC1AE3B0055F61D /* MarsWater.xcdatamodeld */, + 5A715E531BC1AE3B0055F61D /* Supporting Files */, + ); + path = MarsWater; + sourceTree = ""; + }; + 5A715E531BC1AE3B0055F61D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 5A715E541BC1AE3B0055F61D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 5A715E8C1BC1C4140055F61D /* Model */ = { + isa = PBXGroup; + children = ( + 5A715E801BC1C4030055F61D /* Task+CoreDataProperties.h */, + 5A715E811BC1C4030055F61D /* Task+CoreDataProperties.m */, + 5A715E821BC1C4030055F61D /* Task.h */, + 5A715E831BC1C4030055F61D /* Task.m */, + 5A715E841BC1C4030055F61D /* List+CoreDataProperties.h */, + 5A715E851BC1C4030055F61D /* List+CoreDataProperties.m */, + 5A715E861BC1C4030055F61D /* List.h */, + 5A715E871BC1C4030055F61D /* List.m */, + ); + name = Model; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5A715E4F1BC1AE3B0055F61D /* MarsWater */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5A715E6A1BC1AE3B0055F61D /* Build configuration list for PBXNativeTarget "MarsWater" */; + buildPhases = ( + 5A715E4C1BC1AE3B0055F61D /* Sources */, + 5A715E4D1BC1AE3B0055F61D /* Frameworks */, + 5A715E4E1BC1AE3B0055F61D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MarsWater; + productName = MarsWater; + productReference = 5A715E501BC1AE3B0055F61D /* MarsWater.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5A715E481BC1AE3A0055F61D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = "Brian Blanco"; + TargetAttributes = { + 5A715E4F1BC1AE3B0055F61D = { + CreatedOnToolsVersion = 7.0; + DevelopmentTeam = Z6GBYPK592; + }; + }; + }; + buildConfigurationList = 5A715E4B1BC1AE3A0055F61D /* Build configuration list for PBXProject "MarsWater" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5A715E471BC1AE3A0055F61D; + productRefGroup = 5A715E511BC1AE3B0055F61D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5A715E4F1BC1AE3B0055F61D /* MarsWater */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5A715E4E1BC1AE3B0055F61D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5A715E661BC1AE3B0055F61D /* LaunchScreen.storyboard in Resources */, + 5A715E631BC1AE3B0055F61D /* Assets.xcassets in Resources */, + 5A715E5E1BC1AE3B0055F61D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5A715E4C1BC1AE3B0055F61D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5A715E891BC1C4030055F61D /* Task.m in Sources */, + 5A715E611BC1AE3B0055F61D /* MarsWater.xcdatamodeld in Sources */, + 5AE2247C1BC8A6D5004AEB77 /* TaskTableViewController.m in Sources */, + 5AE2247F1BC8A76D004AEB77 /* TaskCreateTableViewController.m in Sources */, + 5A715E581BC1AE3B0055F61D /* AppDelegate.m in Sources */, + 5A715E8B1BC1C4030055F61D /* List.m in Sources */, + 5A715E8A1BC1C4030055F61D /* List+CoreDataProperties.m in Sources */, + 5A715E881BC1C4030055F61D /* Task+CoreDataProperties.m in Sources */, + 5A715E7F1BC1B9500055F61D /* ListCreationTableViewController.m in Sources */, + 5A715E551BC1AE3B0055F61D /* main.m in Sources */, + 5A715E7C1BC1B9100055F61D /* ListTableViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 5A715E5C1BC1AE3B0055F61D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5A715E5D1BC1AE3B0055F61D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 5A715E641BC1AE3B0055F61D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5A715E651BC1AE3B0055F61D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 5A715E681BC1AE3B0055F61D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 5A715E691BC1AE3B0055F61D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "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 = gnu99; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5A715E6B1BC1AE3B0055F61D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWater/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = come.brianblanco.MarsWater; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 5A715E6C1BC1AE3B0055F61D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWater/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = come.brianblanco.MarsWater; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5A715E4B1BC1AE3A0055F61D /* Build configuration list for PBXProject "MarsWater" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5A715E681BC1AE3B0055F61D /* Debug */, + 5A715E691BC1AE3B0055F61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5A715E6A1BC1AE3B0055F61D /* Build configuration list for PBXNativeTarget "MarsWater" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5A715E6B1BC1AE3B0055F61D /* Debug */, + 5A715E6C1BC1AE3B0055F61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 5A715E5F1BC1AE3B0055F61D /* MarsWater.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 5A715E601BC1AE3B0055F61D /* MarsWater.xcdatamodel */, + ); + currentVersion = 5A715E601BC1AE3B0055F61D /* MarsWater.xcdatamodel */; + path = MarsWater.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 5A715E481BC1AE3A0055F61D /* Project object */; +} diff --git a/SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MarsWater/MarsWater.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 68% rename from SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to MarsWater/MarsWater.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 43eb427..4acdfe2 100644 --- a/SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/MarsWater/MarsWater.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:MarsWater.xcodeproj"> diff --git a/SavingForever/SavingForever/AppDelegate.h b/MarsWater/MarsWater/AppDelegate.h similarity index 81% rename from SavingForever/SavingForever/AppDelegate.h rename to MarsWater/MarsWater/AppDelegate.h index 6657831..da9e866 100644 --- a/SavingForever/SavingForever/AppDelegate.h +++ b/MarsWater/MarsWater/AppDelegate.h @@ -1,9 +1,9 @@ // // AppDelegate.h -// SavingForever +// MarsWater // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. // #import diff --git a/SavingForever/SavingForever/AppDelegate.m b/MarsWater/MarsWater/AppDelegate.m similarity index 93% rename from SavingForever/SavingForever/AppDelegate.m rename to MarsWater/MarsWater/AppDelegate.m index 29b2305..13cf627 100644 --- a/SavingForever/SavingForever/AppDelegate.m +++ b/MarsWater/MarsWater/AppDelegate.m @@ -1,9 +1,9 @@ // // AppDelegate.m -// SavingForever +// MarsWater // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. // #import "AppDelegate.h" @@ -51,7 +51,7 @@ - (void)applicationWillTerminate:(UIApplication *)application { @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; - (NSURL *)applicationDocumentsDirectory { - // The directory the application uses to store the Core Data store file. This code uses a directory named "com.mikekavouras.SavingForever" in the application's documents directory. + // The directory the application uses to store the Core Data store file. This code uses a directory named "come.brianblanco.MarsWater" in the application's documents directory. return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; } @@ -60,7 +60,7 @@ - (NSManagedObjectModel *)managedObjectModel { if (_managedObjectModel != nil) { return _managedObjectModel; } - NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"SavingForever" withExtension:@"momd"]; + NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MarsWater" withExtension:@"momd"]; _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; return _managedObjectModel; } @@ -74,7 +74,7 @@ - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { // Create the coordinator and store _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; - NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"SavingForever.sqlite"]; + NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"MarsWater.sqlite"]; NSError *error = nil; NSString *failureReason = @"There was an error creating or loading the application's saved data."; if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { diff --git a/SavingForever/SavingForever/Assets.xcassets/AppIcon.appiconset/Contents.json b/MarsWater/MarsWater/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from SavingForever/SavingForever/Assets.xcassets/AppIcon.appiconset/Contents.json rename to MarsWater/MarsWater/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/SavingForever/SavingForever/Base.lproj/LaunchScreen.storyboard b/MarsWater/MarsWater/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from SavingForever/SavingForever/Base.lproj/LaunchScreen.storyboard rename to MarsWater/MarsWater/Base.lproj/LaunchScreen.storyboard diff --git a/MarsWater/MarsWater/Base.lproj/Main.storyboard b/MarsWater/MarsWater/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1c311fa --- /dev/null +++ b/MarsWater/MarsWater/Base.lproj/Main.storyboard @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SavingForever/SavingForever/Info.plist b/MarsWater/MarsWater/Info.plist similarity index 100% rename from SavingForever/SavingForever/Info.plist rename to MarsWater/MarsWater/Info.plist diff --git a/MarsWater/MarsWater/List+CoreDataProperties.h b/MarsWater/MarsWater/List+CoreDataProperties.h new file mode 100644 index 0000000..2fb44a0 --- /dev/null +++ b/MarsWater/MarsWater/List+CoreDataProperties.h @@ -0,0 +1,40 @@ +// +// List+CoreDataProperties.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// +// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu +// to delete and recreate this implementation file for your updated model. +// + +#import "List.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface List (CoreDataProperties) + +@property (nullable, nonatomic, retain) NSString *title; +@property (nullable, nonatomic, retain) NSDate *createdAt; +@property (nullable, nonatomic, retain) id color; +@property (nullable, nonatomic, retain) NSArray *task; + +@end + +@interface List (CoreDataGeneratedAccessors) + +- (void)insertObject:(Task *)value inTaskAtIndex:(NSUInteger)idx; +- (void)removeObjectFromTaskAtIndex:(NSUInteger)idx; +- (void)insertTask:(NSArray *)value atIndexes:(NSIndexSet *)indexes; +- (void)removeTaskAtIndexes:(NSIndexSet *)indexes; +- (void)replaceObjectInTaskAtIndex:(NSUInteger)idx withObject:(Task *)value; +- (void)replaceTaskAtIndexes:(NSIndexSet *)indexes withTask:(NSArray *)values; +- (void)addTaskObject:(Task *)value; +- (void)removeTaskObject:(Task *)value; +- (void)addTask:(NSOrderedSet *)values; +- (void)removeTask:(NSOrderedSet *)values; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MarsWater/MarsWater/List+CoreDataProperties.m b/MarsWater/MarsWater/List+CoreDataProperties.m new file mode 100644 index 0000000..e554ff7 --- /dev/null +++ b/MarsWater/MarsWater/List+CoreDataProperties.m @@ -0,0 +1,21 @@ +// +// List+CoreDataProperties.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// +// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu +// to delete and recreate this implementation file for your updated model. +// + +#import "List+CoreDataProperties.h" + +@implementation List (CoreDataProperties) + +@dynamic title; +@dynamic createdAt; +@dynamic color; +@dynamic task; + +@end diff --git a/MarsWater/MarsWater/List.h b/MarsWater/MarsWater/List.h new file mode 100644 index 0000000..03c8589 --- /dev/null +++ b/MarsWater/MarsWater/List.h @@ -0,0 +1,24 @@ +// +// List.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import +#import + +@class Task; + +NS_ASSUME_NONNULL_BEGIN + +@interface List : NSManagedObject + +// Insert code here to declare functionality of your managed object subclass + +@end + +NS_ASSUME_NONNULL_END + +#import "List+CoreDataProperties.h" diff --git a/MarsWater/MarsWater/List.m b/MarsWater/MarsWater/List.m new file mode 100644 index 0000000..c122a0c --- /dev/null +++ b/MarsWater/MarsWater/List.m @@ -0,0 +1,16 @@ +// +// List.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import "List.h" +#import "Task.h" + +@implementation List + +// Insert code here to add functionality to your managed object subclass + +@end diff --git a/MarsWater/MarsWater/ListCreationTableViewController.h b/MarsWater/MarsWater/ListCreationTableViewController.h new file mode 100644 index 0000000..e259fcb --- /dev/null +++ b/MarsWater/MarsWater/ListCreationTableViewController.h @@ -0,0 +1,13 @@ +// +// ListCreationTableViewController.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import + +@interface ListCreationTableViewController : UITableViewController + +@end diff --git a/MarsWater/MarsWater/ListCreationTableViewController.m b/MarsWater/MarsWater/ListCreationTableViewController.m new file mode 100644 index 0000000..b012a86 --- /dev/null +++ b/MarsWater/MarsWater/ListCreationTableViewController.m @@ -0,0 +1,63 @@ +// +// ListCreationTableViewController.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// +#import +#import "ListCreationTableViewController.h" +#import "List.h" +#import "AppDelegate.h" + +@interface ListCreationTableViewController () + +@property (weak, nonatomic) IBOutlet UITextField *titleTextField; +@property (nonatomic) List *list; + +@end + +@implementation ListCreationTableViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + [self setupNavigationBar]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + self.list = [NSEntityDescription insertNewObjectForEntityForName:@"List" inManagedObjectContext:delegate.managedObjectContext]; + + NSLog(@"%@", self.list); +} + +- (void)setupNavigationBar +{ + self.navigationItem.title = @"Create new list"; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel)]; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(save)]; +} + +- (void) cancel +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (void) save +{ + self.list.title = self.titleTextField.text; + self.list.createdAt = [NSDate date]; + NSLog(@"%@", self.list); + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + [delegate.managedObjectContext save:nil]; + + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (IBAction)colorButtonTapped:(UIButton *)sender { + + self.list.color = sender.backgroundColor; +} +@end diff --git a/MarsWater/MarsWater/ListTableViewController.h b/MarsWater/MarsWater/ListTableViewController.h new file mode 100644 index 0000000..6b42dc3 --- /dev/null +++ b/MarsWater/MarsWater/ListTableViewController.h @@ -0,0 +1,13 @@ +// +// ListTableViewController.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import + +@interface ListTableViewController : UITableViewController + +@end diff --git a/MarsWater/MarsWater/ListTableViewController.m b/MarsWater/MarsWater/ListTableViewController.m new file mode 100644 index 0000000..f378742 --- /dev/null +++ b/MarsWater/MarsWater/ListTableViewController.m @@ -0,0 +1,126 @@ +// +// ListTableViewController.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import "ListTableViewController.h" +#import +#import "AppDelegate.h" +#import "List.h" + +@interface ListTableViewController () + +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; + +@end + +@implementation ListTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"List"]; + NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"createdAt" ascending:NO]; + fetchRequest.sortDescriptors = @[sort]; + + self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:delegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; + + self.fetchedResultsController.delegate = self; + + [self.fetchedResultsController performFetch:nil]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { +#warning Incomplete implementation, return the number of sections + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { +#warning Incomplete implementation, return the number of rows + return self.fetchedResultsController.fetchedObjects.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TaskCell" forIndexPath:indexPath]; + + List *list = self.fetchedResultsController.fetchedObjects[indexPath.row]; + cell.textLabel.text = list.title; + cell.backgroundColor = (UIColor *)list.color; + cell.detailTextLabel.text = [list.createdAt description]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (editingStyle == UITableViewCellEditingStyleDelete) { + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; + } +} + +- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath +{ + [self.tableView reloadData]; +} + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion b/MarsWater/MarsWater/MarsWater.xcdatamodeld/.xccurrentversion similarity index 83% rename from SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion rename to MarsWater/MarsWater/MarsWater.xcdatamodeld/.xccurrentversion index 352ed15..5c0cbd5 100644 --- a/SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion +++ b/MarsWater/MarsWater/MarsWater.xcdatamodeld/.xccurrentversion @@ -3,6 +3,6 @@ _XCCurrentVersionName - SavingForever.xcdatamodel + MarsWater.xcdatamodel diff --git a/MarsWater/MarsWater/MarsWater.xcdatamodeld/MarsWater.xcdatamodel/contents b/MarsWater/MarsWater/MarsWater.xcdatamodeld/MarsWater.xcdatamodel/contents new file mode 100644 index 0000000..f595edb --- /dev/null +++ b/MarsWater/MarsWater/MarsWater.xcdatamodeld/MarsWater.xcdatamodel/contents @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MarsWater/MarsWater/Task+CoreDataProperties.h b/MarsWater/MarsWater/Task+CoreDataProperties.h new file mode 100644 index 0000000..55736a0 --- /dev/null +++ b/MarsWater/MarsWater/Task+CoreDataProperties.h @@ -0,0 +1,29 @@ +// +// Task+CoreDataProperties.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// +// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu +// to delete and recreate this implementation file for your updated model. +// + +#import "Task.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface Task (CoreDataProperties) + +@property (nullable, nonatomic, retain) NSString *taskDescription; +@property (nullable, nonatomic, retain) NSDate *createdAt; +@property (nullable, nonatomic, retain) NSDate *dueAt; +@property (nullable, nonatomic, retain) NSDate *updatedAt; +@property (nullable, nonatomic, retain) NSNumber *priority; +@property (nullable, nonatomic, retain) NSDate *completed; +@property (nullable, nonatomic, retain) NSDate *completedAt; +@property (nullable, nonatomic, retain) List *list; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MarsWater/MarsWater/Task+CoreDataProperties.m b/MarsWater/MarsWater/Task+CoreDataProperties.m new file mode 100644 index 0000000..377f69e --- /dev/null +++ b/MarsWater/MarsWater/Task+CoreDataProperties.m @@ -0,0 +1,25 @@ +// +// Task+CoreDataProperties.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// +// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu +// to delete and recreate this implementation file for your updated model. +// + +#import "Task+CoreDataProperties.h" + +@implementation Task (CoreDataProperties) + +@dynamic taskDescription; +@dynamic createdAt; +@dynamic dueAt; +@dynamic updatedAt; +@dynamic priority; +@dynamic completed; +@dynamic completedAt; +@dynamic list; + +@end diff --git a/MarsWater/MarsWater/Task.h b/MarsWater/MarsWater/Task.h new file mode 100644 index 0000000..c9ea523 --- /dev/null +++ b/MarsWater/MarsWater/Task.h @@ -0,0 +1,24 @@ +// +// Task.h +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import +#import + +@class List; + +NS_ASSUME_NONNULL_BEGIN + +@interface Task : NSManagedObject + +// Insert code here to declare functionality of your managed object subclass + +@end + +NS_ASSUME_NONNULL_END + +#import "Task+CoreDataProperties.h" diff --git a/MarsWater/MarsWater/Task.m b/MarsWater/MarsWater/Task.m new file mode 100644 index 0000000..0246cf2 --- /dev/null +++ b/MarsWater/MarsWater/Task.m @@ -0,0 +1,16 @@ +// +// Task.m +// MarsWater +// +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import "Task.h" +#import "List.h" + +@implementation Task + +// Insert code here to add functionality to your managed object subclass + +@end diff --git a/MarsWater/MarsWater/TaskCreateTableViewController.h b/MarsWater/MarsWater/TaskCreateTableViewController.h new file mode 100644 index 0000000..a7fd4c6 --- /dev/null +++ b/MarsWater/MarsWater/TaskCreateTableViewController.h @@ -0,0 +1,16 @@ +// +// TaskCreateTableViewController.h +// MarsWater +// +// Created by Brian Blanco on 10/9/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import +#import "List.h" + +@interface TaskCreateTableViewController : UITableViewController + +@property (nonatomic) List *list; + +@end diff --git a/MarsWater/MarsWater/TaskCreateTableViewController.m b/MarsWater/MarsWater/TaskCreateTableViewController.m new file mode 100644 index 0000000..b778e6c --- /dev/null +++ b/MarsWater/MarsWater/TaskCreateTableViewController.m @@ -0,0 +1,55 @@ +// +// TaskCreateTableViewController.m +// MarsWater +// +// Created by Brian Blanco on 10/9/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import "TaskCreateTableViewController.h" +#import "Task.h" +#import "AppDelegate.h" + +@interface TaskCreateTableViewController () + +@property (weak, nonatomic) IBOutlet UITextField *textField; +@property (nonatomic) NSMutableArray*listOfTasks; +@property (nonatomic) Task *task; + +@end + +@implementation TaskCreateTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.listOfTasks = [self.list.task mutableCopy]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + self.task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:delegate.managedObjectContext]; +} + +- (IBAction)cancel:(id)sender { + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (IBAction)done:(id)sender { + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + self.task.taskDescription = self.textField.text; + self.task.createdAt = [NSDate date]; + + [self.listOfTasks addObject:self.task]; + + self.list.task = self.listOfTasks; + + [delegate.managedObjectContext save:nil]; + + [self dismissViewControllerAnimated:YES completion:nil]; +} + + + +@end diff --git a/MarsWater/MarsWater/TaskTableViewController.h b/MarsWater/MarsWater/TaskTableViewController.h new file mode 100644 index 0000000..be27b8d --- /dev/null +++ b/MarsWater/MarsWater/TaskTableViewController.h @@ -0,0 +1,17 @@ +// +// TaskTableViewController.h +// MarsWater +// +// Created by Brian Blanco on 10/9/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import +#import "List.h" + +@interface TaskTableViewController : UITableViewController + +@property (nonatomic) List *list; + +@end + diff --git a/MarsWater/MarsWater/TaskTableViewController.m b/MarsWater/MarsWater/TaskTableViewController.m new file mode 100644 index 0000000..c56753a --- /dev/null +++ b/MarsWater/MarsWater/TaskTableViewController.m @@ -0,0 +1,63 @@ +// +// TaskTableViewController.m +// MarsWater +// +// Created by Brian Blanco on 10/9/15. +// Copyright © 2015 Brian Blanco. All rights reserved. +// + +#import "TaskTableViewController.h" +#import "TaskCreateTableViewController.h" +#import "AppDelegate.h" +#import "Task.h" + +@interface TaskTableViewController () + +@end + +@implementation TaskTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + + +} + +-(void)viewWillAppear:(BOOL)animated{ + + [self.tableView reloadData]; +} + + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.list.task.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TaskCell" forIndexPath:indexPath]; + + Task *task = self.list.task[indexPath.row]; + + cell.textLabel.text = task.taskDescription; + + return cell; +} + + +-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ + + UINavigationController *navigationController = segue.destinationViewController; + + TaskCreateTableViewController *taskController = (TaskCreateTableViewController*)([navigationController viewControllers][0]); + taskController.list = self.list; +} + + + + +@end diff --git a/SavingForever/SavingForever/main.m b/MarsWater/MarsWater/main.m similarity index 64% rename from SavingForever/SavingForever/main.m rename to MarsWater/MarsWater/main.m index 0d1314d..3384b86 100644 --- a/SavingForever/SavingForever/main.m +++ b/MarsWater/MarsWater/main.m @@ -1,9 +1,9 @@ // // main.m -// SavingForever +// MarsWater // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Brian Blanco on 10/4/15. +// Copyright © 2015 Brian Blanco. All rights reserved. // #import diff --git a/SavingForever/SavingForever.xcodeproj/project.pbxproj b/SavingForever/SavingForever.xcodeproj/project.pbxproj deleted file mode 100644 index cbf89e2..0000000 --- a/SavingForever/SavingForever.xcodeproj/project.pbxproj +++ /dev/null @@ -1,322 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 8D2949671BC1D06E00FDC81F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D2949661BC1D06E00FDC81F /* main.m */; }; - 8D29496A1BC1D06E00FDC81F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D2949691BC1D06E00FDC81F /* AppDelegate.m */; }; - 8D29496D1BC1D06E00FDC81F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D29496C1BC1D06E00FDC81F /* ViewController.m */; }; - 8D2949701BC1D06E00FDC81F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D29496E1BC1D06E00FDC81F /* Main.storyboard */; }; - 8D2949731BC1D06E00FDC81F /* SavingForever.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 8D2949711BC1D06E00FDC81F /* SavingForever.xcdatamodeld */; }; - 8D2949751BC1D06E00FDC81F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D2949741BC1D06E00FDC81F /* Assets.xcassets */; }; - 8D2949781BC1D06E00FDC81F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D2949761BC1D06E00FDC81F /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 8D2949621BC1D06E00FDC81F /* SavingForever.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SavingForever.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D2949661BC1D06E00FDC81F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 8D2949681BC1D06E00FDC81F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 8D2949691BC1D06E00FDC81F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8D29496B1BC1D06E00FDC81F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 8D29496C1BC1D06E00FDC81F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 8D29496F1BC1D06E00FDC81F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 8D2949721BC1D06E00FDC81F /* SavingForever.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SavingForever.xcdatamodel; sourceTree = ""; }; - 8D2949741BC1D06E00FDC81F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 8D2949771BC1D06E00FDC81F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 8D2949791BC1D06E00FDC81F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D29495F1BC1D06E00FDC81F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 8D2949591BC1D06D00FDC81F = { - isa = PBXGroup; - children = ( - 8D2949641BC1D06E00FDC81F /* SavingForever */, - 8D2949631BC1D06E00FDC81F /* Products */, - ); - sourceTree = ""; - }; - 8D2949631BC1D06E00FDC81F /* Products */ = { - isa = PBXGroup; - children = ( - 8D2949621BC1D06E00FDC81F /* SavingForever.app */, - ); - name = Products; - sourceTree = ""; - }; - 8D2949641BC1D06E00FDC81F /* SavingForever */ = { - isa = PBXGroup; - children = ( - 8D2949681BC1D06E00FDC81F /* AppDelegate.h */, - 8D2949691BC1D06E00FDC81F /* AppDelegate.m */, - 8D29496B1BC1D06E00FDC81F /* ViewController.h */, - 8D29496C1BC1D06E00FDC81F /* ViewController.m */, - 8D29496E1BC1D06E00FDC81F /* Main.storyboard */, - 8D2949741BC1D06E00FDC81F /* Assets.xcassets */, - 8D2949761BC1D06E00FDC81F /* LaunchScreen.storyboard */, - 8D2949791BC1D06E00FDC81F /* Info.plist */, - 8D2949711BC1D06E00FDC81F /* SavingForever.xcdatamodeld */, - 8D2949651BC1D06E00FDC81F /* Supporting Files */, - ); - path = SavingForever; - sourceTree = ""; - }; - 8D2949651BC1D06E00FDC81F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 8D2949661BC1D06E00FDC81F /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D2949611BC1D06E00FDC81F /* SavingForever */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8D29497C1BC1D06E00FDC81F /* Build configuration list for PBXNativeTarget "SavingForever" */; - buildPhases = ( - 8D29495E1BC1D06E00FDC81F /* Sources */, - 8D29495F1BC1D06E00FDC81F /* Frameworks */, - 8D2949601BC1D06E00FDC81F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SavingForever; - productName = SavingForever; - productReference = 8D2949621BC1D06E00FDC81F /* SavingForever.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 8D29495A1BC1D06D00FDC81F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = "Michael Kavouras"; - TargetAttributes = { - 8D2949611BC1D06E00FDC81F = { - CreatedOnToolsVersion = 7.0.1; - }; - }; - }; - buildConfigurationList = 8D29495D1BC1D06D00FDC81F /* Build configuration list for PBXProject "SavingForever" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 8D2949591BC1D06D00FDC81F; - productRefGroup = 8D2949631BC1D06E00FDC81F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D2949611BC1D06E00FDC81F /* SavingForever */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D2949601BC1D06E00FDC81F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D2949781BC1D06E00FDC81F /* LaunchScreen.storyboard in Resources */, - 8D2949751BC1D06E00FDC81F /* Assets.xcassets in Resources */, - 8D2949701BC1D06E00FDC81F /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D29495E1BC1D06E00FDC81F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D29496D1BC1D06E00FDC81F /* ViewController.m in Sources */, - 8D29496A1BC1D06E00FDC81F /* AppDelegate.m in Sources */, - 8D2949671BC1D06E00FDC81F /* main.m in Sources */, - 8D2949731BC1D06E00FDC81F /* SavingForever.xcdatamodeld in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 8D29496E1BC1D06E00FDC81F /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 8D29496F1BC1D06E00FDC81F /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 8D2949761BC1D06E00FDC81F /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 8D2949771BC1D06E00FDC81F /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 8D29497A1BC1D06E00FDC81F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 8D29497B1BC1D06E00FDC81F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "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 = gnu99; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 8D29497D1BC1D06E00FDC81F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SavingForever/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.mikekavouras.SavingForever; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 8D29497E1BC1D06E00FDC81F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SavingForever/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.mikekavouras.SavingForever; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 8D29495D1BC1D06D00FDC81F /* Build configuration list for PBXProject "SavingForever" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8D29497A1BC1D06E00FDC81F /* Debug */, - 8D29497B1BC1D06E00FDC81F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8D29497C1BC1D06E00FDC81F /* Build configuration list for PBXNativeTarget "SavingForever" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8D29497D1BC1D06E00FDC81F /* Debug */, - 8D29497E1BC1D06E00FDC81F /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - -/* Begin XCVersionGroup section */ - 8D2949711BC1D06E00FDC81F /* SavingForever.xcdatamodeld */ = { - isa = XCVersionGroup; - children = ( - 8D2949721BC1D06E00FDC81F /* SavingForever.xcdatamodel */, - ); - currentVersion = 8D2949721BC1D06E00FDC81F /* SavingForever.xcdatamodel */; - path = SavingForever.xcdatamodeld; - sourceTree = ""; - versionGroupType = wrapper.xcdatamodel; - }; -/* End XCVersionGroup section */ - }; - rootObject = 8D29495A1BC1D06D00FDC81F /* Project object */; -} diff --git a/SavingForever/SavingForever/Base.lproj/Main.storyboard b/SavingForever/SavingForever/Base.lproj/Main.storyboard deleted file mode 100644 index f56d2f3..0000000 --- a/SavingForever/SavingForever/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SavingForever/SavingForever/SavingForever.xcdatamodeld/SavingForever.xcdatamodel/contents b/SavingForever/SavingForever/SavingForever.xcdatamodeld/SavingForever.xcdatamodel/contents deleted file mode 100644 index 193f33c..0000000 --- a/SavingForever/SavingForever/SavingForever.xcdatamodeld/SavingForever.xcdatamodel/contents +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/SavingForever/SavingForever/ViewController.h b/SavingForever/SavingForever/ViewController.h deleted file mode 100644 index b193f94..0000000 --- a/SavingForever/SavingForever/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// SavingForever -// -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/SavingForever/SavingForever/ViewController.m b/SavingForever/SavingForever/ViewController.m deleted file mode 100644 index 5f1f663..0000000 --- a/SavingForever/SavingForever/ViewController.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// ViewController.m -// SavingForever -// -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end