diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/MarsWaterCore/MarsWaterCore.xcodeproj/project.pbxproj b/MarsWaterCore/MarsWaterCore.xcodeproj/project.pbxproj new file mode 100644 index 0000000..423cc46 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore.xcodeproj/project.pbxproj @@ -0,0 +1,375 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 220182751BC1AEC000D53577 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 220182741BC1AEC000D53577 /* main.m */; }; + 220182781BC1AEC000D53577 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 220182771BC1AEC000D53577 /* AppDelegate.m */; }; + 2201827E1BC1AEC000D53577 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2201827C1BC1AEC000D53577 /* Main.storyboard */; }; + 220182811BC1AEC000D53577 /* MarsWaterCore.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 2201827F1BC1AEC000D53577 /* MarsWaterCore.xcdatamodeld */; }; + 220182831BC1AEC000D53577 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 220182821BC1AEC000D53577 /* Assets.xcassets */; }; + 220182861BC1AEC000D53577 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 220182841BC1AEC000D53577 /* LaunchScreen.storyboard */; }; + 220182951BC1B34400D53577 /* Task+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 2201828E1BC1B34400D53577 /* Task+CoreDataProperties.m */; settings = {ASSET_TAGS = (); }; }; + 220182961BC1B34400D53577 /* Task.m in Sources */ = {isa = PBXBuildFile; fileRef = 220182901BC1B34400D53577 /* Task.m */; settings = {ASSET_TAGS = (); }; }; + 220182971BC1B34400D53577 /* List+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 220182921BC1B34400D53577 /* List+CoreDataProperties.m */; settings = {ASSET_TAGS = (); }; }; + 220182981BC1B34400D53577 /* List.m in Sources */ = {isa = PBXBuildFile; fileRef = 220182941BC1B34400D53577 /* List.m */; settings = {ASSET_TAGS = (); }; }; + 2201829C1BC1B96200D53577 /* ListsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2201829B1BC1B96200D53577 /* ListsTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 2201829F1BC1B97A00D53577 /* ListCreationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2201829E1BC1B97A00D53577 /* ListCreationTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 221C354E1BC476C400A1E707 /* TasksTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C354D1BC476C400A1E707 /* TasksTableViewController.m */; settings = {ASSET_TAGS = (); }; }; + 221C35511BC476D800A1E707 /* TaskCreationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C35501BC476D800A1E707 /* TaskCreationTableViewController.m */; settings = {ASSET_TAGS = (); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 220182701BC1AEBF00D53577 /* MarsWaterCore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MarsWaterCore.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 220182741BC1AEC000D53577 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 220182761BC1AEC000D53577 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 220182771BC1AEC000D53577 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 2201827D1BC1AEC000D53577 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 220182801BC1AEC000D53577 /* MarsWaterCore.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MarsWaterCore.xcdatamodel; sourceTree = ""; }; + 220182821BC1AEC000D53577 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 220182851BC1AEC000D53577 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 220182871BC1AEC000D53577 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2201828D1BC1B34400D53577 /* Task+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Task+CoreDataProperties.h"; path = "MarsWaterCore/Task+CoreDataProperties.h"; sourceTree = ""; }; + 2201828E1BC1B34400D53577 /* Task+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "Task+CoreDataProperties.m"; path = "MarsWaterCore/Task+CoreDataProperties.m"; sourceTree = ""; }; + 2201828F1BC1B34400D53577 /* Task.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Task.h; path = MarsWaterCore/Task.h; sourceTree = ""; }; + 220182901BC1B34400D53577 /* Task.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Task.m; path = MarsWaterCore/Task.m; sourceTree = ""; }; + 220182911BC1B34400D53577 /* List+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "List+CoreDataProperties.h"; path = "MarsWaterCore/List+CoreDataProperties.h"; sourceTree = ""; }; + 220182921BC1B34400D53577 /* List+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "List+CoreDataProperties.m"; path = "MarsWaterCore/List+CoreDataProperties.m"; sourceTree = ""; }; + 220182931BC1B34400D53577 /* List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = List.h; path = MarsWaterCore/List.h; sourceTree = ""; }; + 220182941BC1B34400D53577 /* List.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = List.m; path = MarsWaterCore/List.m; sourceTree = ""; }; + 2201829A1BC1B96200D53577 /* ListsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListsTableViewController.h; sourceTree = ""; }; + 2201829B1BC1B96200D53577 /* ListsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListsTableViewController.m; sourceTree = ""; }; + 2201829D1BC1B97A00D53577 /* ListCreationTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListCreationTableViewController.h; sourceTree = ""; }; + 2201829E1BC1B97A00D53577 /* ListCreationTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListCreationTableViewController.m; sourceTree = ""; }; + 221C354C1BC476C400A1E707 /* TasksTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksTableViewController.h; sourceTree = ""; }; + 221C354D1BC476C400A1E707 /* TasksTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksTableViewController.m; sourceTree = ""; }; + 221C354F1BC476D800A1E707 /* TaskCreationTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskCreationTableViewController.h; sourceTree = ""; }; + 221C35501BC476D800A1E707 /* TaskCreationTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskCreationTableViewController.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2201826D1BC1AEBF00D53577 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 220182671BC1AEBF00D53577 = { + isa = PBXGroup; + children = ( + 220182721BC1AEC000D53577 /* MarsWaterCore */, + 220182711BC1AEBF00D53577 /* Products */, + ); + sourceTree = ""; + }; + 220182711BC1AEBF00D53577 /* Products */ = { + isa = PBXGroup; + children = ( + 220182701BC1AEBF00D53577 /* MarsWaterCore.app */, + ); + name = Products; + sourceTree = ""; + }; + 220182721BC1AEC000D53577 /* MarsWaterCore */ = { + isa = PBXGroup; + children = ( + 220182761BC1AEC000D53577 /* AppDelegate.h */, + 220182771BC1AEC000D53577 /* AppDelegate.m */, + 2201829A1BC1B96200D53577 /* ListsTableViewController.h */, + 2201829B1BC1B96200D53577 /* ListsTableViewController.m */, + 2201829D1BC1B97A00D53577 /* ListCreationTableViewController.h */, + 2201829E1BC1B97A00D53577 /* ListCreationTableViewController.m */, + 221C354C1BC476C400A1E707 /* TasksTableViewController.h */, + 221C354D1BC476C400A1E707 /* TasksTableViewController.m */, + 221C354F1BC476D800A1E707 /* TaskCreationTableViewController.h */, + 221C35501BC476D800A1E707 /* TaskCreationTableViewController.m */, + 2201827C1BC1AEC000D53577 /* Main.storyboard */, + 220182821BC1AEC000D53577 /* Assets.xcassets */, + 220182841BC1AEC000D53577 /* LaunchScreen.storyboard */, + 220182871BC1AEC000D53577 /* Info.plist */, + 2201827F1BC1AEC000D53577 /* MarsWaterCore.xcdatamodeld */, + 220182991BC1B37A00D53577 /* Model */, + 220182731BC1AEC000D53577 /* Supporting Files */, + ); + path = MarsWaterCore; + sourceTree = ""; + }; + 220182731BC1AEC000D53577 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 220182741BC1AEC000D53577 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 220182991BC1B37A00D53577 /* Model */ = { + isa = PBXGroup; + children = ( + 2201828D1BC1B34400D53577 /* Task+CoreDataProperties.h */, + 2201828E1BC1B34400D53577 /* Task+CoreDataProperties.m */, + 2201828F1BC1B34400D53577 /* Task.h */, + 220182901BC1B34400D53577 /* Task.m */, + 220182911BC1B34400D53577 /* List+CoreDataProperties.h */, + 220182921BC1B34400D53577 /* List+CoreDataProperties.m */, + 220182931BC1B34400D53577 /* List.h */, + 220182941BC1B34400D53577 /* List.m */, + ); + name = Model; + path = ..; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2201826F1BC1AEBF00D53577 /* MarsWaterCore */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2201828A1BC1AEC000D53577 /* Build configuration list for PBXNativeTarget "MarsWaterCore" */; + buildPhases = ( + 2201826C1BC1AEBF00D53577 /* Sources */, + 2201826D1BC1AEBF00D53577 /* Frameworks */, + 2201826E1BC1AEBF00D53577 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MarsWaterCore; + productName = MarsWaterCore; + productReference = 220182701BC1AEBF00D53577 /* MarsWaterCore.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 220182681BC1AEBF00D53577 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = ddistant; + TargetAttributes = { + 2201826F1BC1AEBF00D53577 = { + CreatedOnToolsVersion = 7.0; + DevelopmentTeam = N2DCZ2U592; + }; + }; + }; + buildConfigurationList = 2201826B1BC1AEBF00D53577 /* Build configuration list for PBXProject "MarsWaterCore" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 220182671BC1AEBF00D53577; + productRefGroup = 220182711BC1AEBF00D53577 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2201826F1BC1AEBF00D53577 /* MarsWaterCore */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2201826E1BC1AEBF00D53577 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 220182861BC1AEC000D53577 /* LaunchScreen.storyboard in Resources */, + 220182831BC1AEC000D53577 /* Assets.xcassets in Resources */, + 2201827E1BC1AEC000D53577 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2201826C1BC1AEBF00D53577 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 220182951BC1B34400D53577 /* Task+CoreDataProperties.m in Sources */, + 220182811BC1AEC000D53577 /* MarsWaterCore.xcdatamodeld in Sources */, + 221C35511BC476D800A1E707 /* TaskCreationTableViewController.m in Sources */, + 220182781BC1AEC000D53577 /* AppDelegate.m in Sources */, + 2201829C1BC1B96200D53577 /* ListsTableViewController.m in Sources */, + 220182961BC1B34400D53577 /* Task.m in Sources */, + 220182981BC1B34400D53577 /* List.m in Sources */, + 221C354E1BC476C400A1E707 /* TasksTableViewController.m in Sources */, + 2201829F1BC1B97A00D53577 /* ListCreationTableViewController.m in Sources */, + 220182751BC1AEC000D53577 /* main.m in Sources */, + 220182971BC1B34400D53577 /* List+CoreDataProperties.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2201827C1BC1AEC000D53577 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2201827D1BC1AEC000D53577 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 220182841BC1AEC000D53577 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 220182851BC1AEC000D53577 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 220182881BC1AEC000D53577 /* 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; + }; + 220182891BC1AEC000D53577 /* 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; + }; + 2201828B1BC1AEC000D53577 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWaterCore/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nyc.c4q.MarsWaterCore; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 2201828C1BC1AEC000D53577 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWaterCore/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nyc.c4q.MarsWaterCore; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2201826B1BC1AEBF00D53577 /* Build configuration list for PBXProject "MarsWaterCore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 220182881BC1AEC000D53577 /* Debug */, + 220182891BC1AEC000D53577 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2201828A1BC1AEC000D53577 /* Build configuration list for PBXNativeTarget "MarsWaterCore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2201828B1BC1AEC000D53577 /* Debug */, + 2201828C1BC1AEC000D53577 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 2201827F1BC1AEC000D53577 /* MarsWaterCore.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 220182801BC1AEC000D53577 /* MarsWaterCore.xcdatamodel */, + ); + currentVersion = 220182801BC1AEC000D53577 /* MarsWaterCore.xcdatamodel */; + path = MarsWaterCore.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 220182681BC1AEBF00D53577 /* Project object */; +} diff --git a/SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MarsWaterCore/MarsWaterCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 68% rename from SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to MarsWaterCore/MarsWaterCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 43eb427..3465781 100644 --- a/SavingForever/SavingForever.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/MarsWaterCore/MarsWaterCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:MarsWaterCore.xcodeproj"> diff --git a/MarsWaterCore/MarsWaterCore/.DS_Store b/MarsWaterCore/MarsWaterCore/.DS_Store new file mode 100644 index 0000000..285e067 Binary files /dev/null and b/MarsWaterCore/MarsWaterCore/.DS_Store differ diff --git a/SavingForever/SavingForever/AppDelegate.h b/MarsWaterCore/MarsWaterCore/AppDelegate.h similarity index 81% rename from SavingForever/SavingForever/AppDelegate.h rename to MarsWaterCore/MarsWaterCore/AppDelegate.h index 6657831..21e7361 100644 --- a/SavingForever/SavingForever/AppDelegate.h +++ b/MarsWaterCore/MarsWaterCore/AppDelegate.h @@ -1,9 +1,9 @@ // // AppDelegate.h -// SavingForever +// MarsWaterCore // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. // #import diff --git a/SavingForever/SavingForever/AppDelegate.m b/MarsWaterCore/MarsWaterCore/AppDelegate.m similarity index 93% rename from SavingForever/SavingForever/AppDelegate.m rename to MarsWaterCore/MarsWaterCore/AppDelegate.m index 29b2305..bbe3ea9 100644 --- a/SavingForever/SavingForever/AppDelegate.m +++ b/MarsWaterCore/MarsWaterCore/AppDelegate.m @@ -1,9 +1,9 @@ // // AppDelegate.m -// SavingForever +// MarsWaterCore // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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 "nyc.c4q.MarsWaterCore" 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:@"MarsWaterCore" 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:@"MarsWaterCore.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/MarsWaterCore/MarsWaterCore/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from SavingForever/SavingForever/Assets.xcassets/AppIcon.appiconset/Contents.json rename to MarsWaterCore/MarsWaterCore/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/SavingForever/SavingForever/Base.lproj/LaunchScreen.storyboard b/MarsWaterCore/MarsWaterCore/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from SavingForever/SavingForever/Base.lproj/LaunchScreen.storyboard rename to MarsWaterCore/MarsWaterCore/Base.lproj/LaunchScreen.storyboard diff --git a/MarsWaterCore/MarsWaterCore/Base.lproj/Main.storyboard b/MarsWaterCore/MarsWaterCore/Base.lproj/Main.storyboard new file mode 100644 index 0000000..ec282a1 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/Base.lproj/Main.storyboard @@ -0,0 +1,415 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SavingForever/SavingForever/Info.plist b/MarsWaterCore/MarsWaterCore/Info.plist similarity index 100% rename from SavingForever/SavingForever/Info.plist rename to MarsWaterCore/MarsWaterCore/Info.plist diff --git a/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.h b/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.h new file mode 100644 index 0000000..bab9657 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.h @@ -0,0 +1,25 @@ +// +// List+CoreDataProperties.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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) NSOrderedSet *task; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.m b/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.m new file mode 100644 index 0000000..05c4095 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/List+CoreDataProperties.m @@ -0,0 +1,21 @@ +// +// List+CoreDataProperties.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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/MarsWaterCore/MarsWaterCore/List.h b/MarsWaterCore/MarsWaterCore/List.h new file mode 100644 index 0000000..6019995 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/List.h @@ -0,0 +1,24 @@ +// +// List.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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/MarsWaterCore/MarsWaterCore/List.m b/MarsWaterCore/MarsWaterCore/List.m new file mode 100644 index 0000000..67b4322 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/List.m @@ -0,0 +1,16 @@ +// +// List.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.h b/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.h new file mode 100644 index 0000000..6f60e9f --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.h @@ -0,0 +1,13 @@ +// +// ListCreationTableViewController.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import + +@interface ListCreationTableViewController : UITableViewController + +@end diff --git a/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.m b/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.m new file mode 100644 index 0000000..34a7935 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/ListCreationTableViewController.m @@ -0,0 +1,60 @@ +// +// ListCreationTableViewController.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import "ListCreationTableViewController.h" +#import "List.h" +#import "AppDelegate.h" +#import + +@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]; + +} +- (IBAction)shadedButtonTapped:(UIButton *)sender { + + self.list.color = sender.backgroundColor; +} + +- (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]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + [delegate.managedObjectContext save:nil]; + + NSLog(@"%@", self.list); + + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/MarsWaterCore/MarsWaterCore/ListsTableViewController.h b/MarsWaterCore/MarsWaterCore/ListsTableViewController.h new file mode 100644 index 0000000..de6d7ad --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/ListsTableViewController.h @@ -0,0 +1,13 @@ +// +// ListsTableViewController.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import + +@interface ListsTableViewController : UITableViewController + +@end diff --git a/MarsWaterCore/MarsWaterCore/ListsTableViewController.m b/MarsWaterCore/MarsWaterCore/ListsTableViewController.m new file mode 100644 index 0000000..c96b1b9 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/ListsTableViewController.m @@ -0,0 +1,89 @@ +// +// ListsTableViewController.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import "ListsTableViewController.h" +#import +#import "AppDelegate.h" +#import "List.h" +#import "TasksTableViewController.h" + +@interface ListsTableViewController () + +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; + +@end + +@implementation ListsTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.tableView.delegate = self; + self.tableView.dataSource = self; + + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + //create an instance of NSFetchRequest with an entity name + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"List"]; + + //make sure to add a sortDescriptor - your NSFetchRequest won't work without it! + NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"createdAt" ascending:NO]; + + //set the sortDescriptor to the instance of NSFetchRequest + fetchRequest.sortDescriptors = @[sortDescriptor]; + + //create an NSFetchedResultsController with a fetchRequest and a managedObjectContext + self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:delegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; + + self.fetchedResultsController.delegate = self; + [self.fetchedResultsController performFetch:nil]; + + [self.tableView reloadData]; +} + +-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + if ([segue.identifier isEqualToString:@"TasksSegue"]) { + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + TasksTableViewController *viewController = [segue destinationViewController]; + List *list = self.fetchedResultsController.fetchedObjects[indexPath.row]; + viewController.navigationItem.title = [NSString stringWithFormat:@"%@", list.title]; + viewController.list = list; + } +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return self.fetchedResultsController.fetchedObjects.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ListCellIdentifier" 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)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { + + [self.tableView reloadData]; +} + + +@end diff --git a/SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion b/MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/.xccurrentversion similarity index 83% rename from SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion rename to MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/.xccurrentversion index 352ed15..58b7e55 100644 --- a/SavingForever/SavingForever/SavingForever.xcdatamodeld/.xccurrentversion +++ b/MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/.xccurrentversion @@ -3,6 +3,6 @@ _XCCurrentVersionName - SavingForever.xcdatamodel + MarsWaterCore.xcdatamodel diff --git a/MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/MarsWaterCore.xcdatamodel/contents b/MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/MarsWaterCore.xcdatamodel/contents new file mode 100644 index 0000000..7d30118 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/MarsWaterCore.xcdatamodeld/MarsWaterCore.xcdatamodel/contents @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.h b/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.h new file mode 100644 index 0000000..1f7b6d0 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.h @@ -0,0 +1,28 @@ +// +// Task+CoreDataProperties.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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 *doAt; +@property (nullable, nonatomic, retain) NSDate *updatedAt; +@property (nullable, nonatomic, retain) NSNumber *priority; +@property (nullable, nonatomic, retain) NSDate *completedAt; +@property (nullable, nonatomic, retain) NSManagedObject *list; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.m b/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.m new file mode 100644 index 0000000..720ce80 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/Task+CoreDataProperties.m @@ -0,0 +1,24 @@ +// +// Task+CoreDataProperties.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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 doAt; +@dynamic updatedAt; +@dynamic priority; +@dynamic completedAt; +@dynamic list; + +@end diff --git a/MarsWaterCore/MarsWaterCore/Task.h b/MarsWaterCore/MarsWaterCore/Task.h new file mode 100644 index 0000000..5449bb6 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/Task.h @@ -0,0 +1,22 @@ +// +// Task.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import +#import + +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/MarsWaterCore/MarsWaterCore/Task.m b/MarsWaterCore/MarsWaterCore/Task.m new file mode 100644 index 0000000..ae3b4bd --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/Task.m @@ -0,0 +1,15 @@ +// +// Task.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import "Task.h" + +@implementation Task + +// Insert code here to add functionality to your managed object subclass + +@end diff --git a/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.h b/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.h new file mode 100644 index 0000000..a0a1f5f --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.h @@ -0,0 +1,16 @@ +// +// TaskCreationTableViewController.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/6/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import +#import "List.h" + +@interface TaskCreationTableViewController : UITableViewController + +@property (nonatomic) List *list; + +@end diff --git a/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.m b/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.m new file mode 100644 index 0000000..6d5a90f --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/TaskCreationTableViewController.m @@ -0,0 +1,59 @@ +// +// TaskCreationTableViewController.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/6/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import "TaskCreationTableViewController.h" +#import "AppDelegate.h" +#import "Task.h" +#import + +@interface TaskCreationTableViewController () + +@property (weak, nonatomic) IBOutlet UIDatePicker *doAtDatePicker; +@property (weak, nonatomic) IBOutlet UITextField *taskDescriptionTextField; +@property (weak, nonatomic) IBOutlet UISegmentedControl *prioritySegementedController; +@property (nonatomic) Task *task; +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; + + +@end + +@implementation TaskCreationTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.navigationItem.title = @"Create a task"; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + self.task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:delegate.managedObjectContext]; +} + +- (IBAction)cancelButtonTapped:(id)sender { + [self.navigationController popViewControllerAnimated:YES]; +} + +- (IBAction)saveButtonTapped:(id)sender { + self.task.createdAt = [NSDate date]; + self.task.doAt = self.doAtDatePicker.date; + self.task.taskDescription = self.taskDescriptionTextField.text; + self.task.priority = [NSNumber numberWithInteger: self.prioritySegementedController.selectedSegmentIndex]; + self.task.list = self.list; + NSMutableOrderedSet *mutableSet = self.list.task.mutableCopy; + [mutableSet addObject:self.task]; + self.list.task = [[NSOrderedSet alloc] initWithOrderedSet:mutableSet]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + [delegate.managedObjectContext save:nil]; + + [self.navigationController popViewControllerAnimated:YES]; +} + + + +@end diff --git a/MarsWaterCore/MarsWaterCore/TasksTableViewController.h b/MarsWaterCore/MarsWaterCore/TasksTableViewController.h new file mode 100644 index 0000000..690b0f5 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/TasksTableViewController.h @@ -0,0 +1,16 @@ +// +// TasksTableViewController.h +// MarsWaterCore +// +// Created by Daniel Distant on 10/6/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import +#import "List.h" + +@interface TasksTableViewController : UITableViewController + +@property (nonatomic) List *list; + +@end diff --git a/MarsWaterCore/MarsWaterCore/TasksTableViewController.m b/MarsWaterCore/MarsWaterCore/TasksTableViewController.m new file mode 100644 index 0000000..3747357 --- /dev/null +++ b/MarsWaterCore/MarsWaterCore/TasksTableViewController.m @@ -0,0 +1,106 @@ +// +// TasksTableViewController.m +// MarsWaterCore +// +// Created by Daniel Distant on 10/6/15. +// Copyright © 2015 ddistant. All rights reserved. +// + +#import "TasksTableViewController.h" +#import "AppDelegate.h" +#import "Task.h" +#import +#import "TaskCreationTableViewController.h" + +@interface TasksTableViewController () + +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; + + +@end + +@implementation TasksTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.tableView.dataSource = self; + self.tableView.delegate = self; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"Task"]; + + NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"doAt" ascending:YES]; + + fetchRequest.sortDescriptors = @[sortDescriptor]; + + self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:delegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; + + self.fetchedResultsController.delegate = self; + + [self.fetchedResultsController performFetch:nil]; + + [self.tableView reloadData]; +} + +-(void)viewDidAppear:(BOOL)animated { + [self.tableView reloadData]; +} +- (IBAction)addButtonTapped:(id)sender { + TaskCreationTableViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"TaskCreation"]; + viewController.list = self.list; + [self.navigationController pushViewController:viewController animated:YES]; +} + +#pragma mark - Table view data source + +- (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:@"TaskCellIdentifier" forIndexPath:indexPath]; + + Task *task = self.fetchedResultsController.fetchedObjects[indexPath.row]; + + if (task != nil) { + + cell.textLabel.text = task.taskDescription; + cell.detailTextLabel.text = [NSString stringWithFormat:@"Do at: %@", task.doAt]; + + if ([task.priority isEqualToNumber: @0] ) { + cell.backgroundColor = [UIColor colorWithRed:225/255.0 green:215/255.0 blue:243/255.0 alpha:1]; + } else if ([task.priority isEqualToNumber: @1] ) { + cell.backgroundColor = [UIColor colorWithRed:198/255.0 green:192/255.0 blue:253/255.0 alpha:1]; + } else if ([task.priority isEqualToNumber: @2] ) { + cell.backgroundColor = [UIColor colorWithRed:127/255.0 green:15/255.0 blue:126/255.0 alpha:1]; + cell.textLabel.textColor = [UIColor whiteColor]; + cell.detailTextLabel.textColor = [UIColor whiteColor]; + } + + if (task.completedAt != nil) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + cell.backgroundColor = [UIColor redColor]; + cell.textLabel.textColor = [UIColor whiteColor]; + cell.detailTextLabel.textColor = [UIColor whiteColor]; + } + } + + return cell; +} + +-(void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { + + [self.tableView reloadData]; +} + + + +@end diff --git a/SavingForever/SavingForever/main.m b/MarsWaterCore/MarsWaterCore/main.m similarity index 64% rename from SavingForever/SavingForever/main.m rename to MarsWaterCore/MarsWaterCore/main.m index 0d1314d..10325ce 100644 --- a/SavingForever/SavingForever/main.m +++ b/MarsWaterCore/MarsWaterCore/main.m @@ -1,9 +1,9 @@ // // main.m -// SavingForever +// MarsWaterCore // -// Created by Michael Kavouras on 10/4/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Daniel Distant on 10/4/15. +// Copyright © 2015 ddistant. 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