diff --git a/MarsWater/MarsWater.xcodeproj/project.pbxproj b/MarsWater/MarsWater.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7fbbdb7 --- /dev/null +++ b/MarsWater/MarsWater.xcodeproj/project.pbxproj @@ -0,0 +1,384 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 18D601571C9B13050085227C /* NSString+Length.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D601561C9B13050085227C /* NSString+Length.m */; }; + DC015AB01BC1AE4800961A06 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015AAF1BC1AE4800961A06 /* main.m */; }; + DC015AB31BC1AE4800961A06 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015AB21BC1AE4800961A06 /* AppDelegate.m */; }; + DC015AB91BC1AE4800961A06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC015AB71BC1AE4800961A06 /* Main.storyboard */; }; + DC015ABC1BC1AE4800961A06 /* MarsWater.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = DC015ABA1BC1AE4800961A06 /* MarsWater.xcdatamodeld */; }; + DC015ABE1BC1AE4800961A06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC015ABD1BC1AE4800961A06 /* Assets.xcassets */; }; + DC015AC11BC1AE4800961A06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC015ABF1BC1AE4800961A06 /* LaunchScreen.storyboard */; }; + DC015AE01BC1B91300961A06 /* ListCreationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015ADF1BC1B91300961A06 /* ListCreationTableViewController.m */; }; + DC015AE31BC1B95300961A06 /* ListsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015AE21BC1B95300961A06 /* ListsTableViewController.m */; }; + DC015AEA1BC22F4C00961A06 /* TasksTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015AE91BC22F4C00961A06 /* TasksTableViewController.m */; }; + DC015B481BC5A70300961A06 /* Task+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015B411BC5A70300961A06 /* Task+CoreDataProperties.m */; }; + DC015B491BC5A70300961A06 /* Task.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015B431BC5A70300961A06 /* Task.m */; }; + DC015B4A1BC5A70300961A06 /* List+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015B451BC5A70300961A06 /* List+CoreDataProperties.m */; }; + DC015B4B1BC5A70300961A06 /* List.m in Sources */ = {isa = PBXBuildFile; fileRef = DC015B471BC5A70300961A06 /* List.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 18D601551C9B13050085227C /* NSString+Length.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Length.h"; sourceTree = ""; }; + 18D601561C9B13050085227C /* NSString+Length.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Length.m"; sourceTree = ""; }; + DC015AAB1BC1AE4800961A06 /* MarsWater.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MarsWater.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DC015AAF1BC1AE4800961A06 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + DC015AB11BC1AE4800961A06 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + DC015AB21BC1AE4800961A06 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + DC015AB81BC1AE4800961A06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + DC015ABB1BC1AE4800961A06 /* MarsWater.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MarsWater.xcdatamodel; sourceTree = ""; }; + DC015ABD1BC1AE4800961A06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + DC015AC01BC1AE4800961A06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + DC015AC21BC1AE4800961A06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DC015ADE1BC1B91300961A06 /* ListCreationTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListCreationTableViewController.h; sourceTree = ""; }; + DC015ADF1BC1B91300961A06 /* ListCreationTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListCreationTableViewController.m; sourceTree = ""; }; + DC015AE11BC1B95300961A06 /* ListsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListsTableViewController.h; sourceTree = ""; }; + DC015AE21BC1B95300961A06 /* ListsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListsTableViewController.m; sourceTree = ""; }; + DC015AE81BC22F4C00961A06 /* TasksTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksTableViewController.h; sourceTree = ""; }; + DC015AE91BC22F4C00961A06 /* TasksTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksTableViewController.m; sourceTree = ""; }; + DC015B401BC5A70300961A06 /* Task+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Task+CoreDataProperties.h"; sourceTree = ""; }; + DC015B411BC5A70300961A06 /* Task+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Task+CoreDataProperties.m"; sourceTree = ""; }; + DC015B421BC5A70300961A06 /* Task.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Task.h; sourceTree = ""; }; + DC015B431BC5A70300961A06 /* Task.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Task.m; sourceTree = ""; }; + DC015B441BC5A70300961A06 /* List+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "List+CoreDataProperties.h"; sourceTree = ""; }; + DC015B451BC5A70300961A06 /* List+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "List+CoreDataProperties.m"; sourceTree = ""; }; + DC015B461BC5A70300961A06 /* List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = List.h; sourceTree = ""; }; + DC015B471BC5A70300961A06 /* List.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = List.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DC015AA81BC1AE4800961A06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + DC015AA21BC1AE4800961A06 = { + isa = PBXGroup; + children = ( + DC015AAD1BC1AE4800961A06 /* MarsWater */, + DC015AAC1BC1AE4800961A06 /* Products */, + ); + sourceTree = ""; + }; + DC015AAC1BC1AE4800961A06 /* Products */ = { + isa = PBXGroup; + children = ( + DC015AAB1BC1AE4800961A06 /* MarsWater.app */, + ); + name = Products; + sourceTree = ""; + }; + DC015AAD1BC1AE4800961A06 /* MarsWater */ = { + isa = PBXGroup; + children = ( + DC015AB11BC1AE4800961A06 /* AppDelegate.h */, + DC015AB21BC1AE4800961A06 /* AppDelegate.m */, + DC015AE71BC2249A00961A06 /* Controllers */, + DC015ACE1BC1B28F00961A06 /* Model */, + DC015AB71BC1AE4800961A06 /* Main.storyboard */, + DC015ABD1BC1AE4800961A06 /* Assets.xcassets */, + DC015ABF1BC1AE4800961A06 /* LaunchScreen.storyboard */, + DC015AC21BC1AE4800961A06 /* Info.plist */, + DC015ABA1BC1AE4800961A06 /* MarsWater.xcdatamodeld */, + DC015AAE1BC1AE4800961A06 /* Supporting Files */, + ); + path = MarsWater; + sourceTree = ""; + }; + DC015AAE1BC1AE4800961A06 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DC015AAF1BC1AE4800961A06 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + DC015ACE1BC1B28F00961A06 /* Model */ = { + isa = PBXGroup; + children = ( + DC015B401BC5A70300961A06 /* Task+CoreDataProperties.h */, + DC015B411BC5A70300961A06 /* Task+CoreDataProperties.m */, + DC015B421BC5A70300961A06 /* Task.h */, + DC015B431BC5A70300961A06 /* Task.m */, + DC015B441BC5A70300961A06 /* List+CoreDataProperties.h */, + DC015B451BC5A70300961A06 /* List+CoreDataProperties.m */, + DC015B461BC5A70300961A06 /* List.h */, + DC015B471BC5A70300961A06 /* List.m */, + ); + name = Model; + sourceTree = ""; + }; + DC015AE71BC2249A00961A06 /* Controllers */ = { + isa = PBXGroup; + children = ( + DC015AE11BC1B95300961A06 /* ListsTableViewController.h */, + DC015AE21BC1B95300961A06 /* ListsTableViewController.m */, + DC015AE81BC22F4C00961A06 /* TasksTableViewController.h */, + DC015AE91BC22F4C00961A06 /* TasksTableViewController.m */, + DC015ADE1BC1B91300961A06 /* ListCreationTableViewController.h */, + DC015ADF1BC1B91300961A06 /* ListCreationTableViewController.m */, + 18D601551C9B13050085227C /* NSString+Length.h */, + 18D601561C9B13050085227C /* NSString+Length.m */, + ); + name = Controllers; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + DC015AAA1BC1AE4800961A06 /* MarsWater */ = { + isa = PBXNativeTarget; + buildConfigurationList = DC015AC51BC1AE4800961A06 /* Build configuration list for PBXNativeTarget "MarsWater" */; + buildPhases = ( + DC015AA71BC1AE4800961A06 /* Sources */, + DC015AA81BC1AE4800961A06 /* Frameworks */, + DC015AA91BC1AE4800961A06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MarsWater; + productName = MarsWater; + productReference = DC015AAB1BC1AE4800961A06 /* MarsWater.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DC015AA31BC1AE4800961A06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = Mesfin; + TargetAttributes = { + DC015AAA1BC1AE4800961A06 = { + CreatedOnToolsVersion = 7.0; + DevelopmentTeam = BULEKXRKSR; + }; + }; + }; + buildConfigurationList = DC015AA61BC1AE4800961A06 /* Build configuration list for PBXProject "MarsWater" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = DC015AA21BC1AE4800961A06; + productRefGroup = DC015AAC1BC1AE4800961A06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + DC015AAA1BC1AE4800961A06 /* MarsWater */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + DC015AA91BC1AE4800961A06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC015AC11BC1AE4800961A06 /* LaunchScreen.storyboard in Resources */, + DC015ABE1BC1AE4800961A06 /* Assets.xcassets in Resources */, + DC015AB91BC1AE4800961A06 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DC015AA71BC1AE4800961A06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC015ABC1BC1AE4800961A06 /* MarsWater.xcdatamodeld in Sources */, + DC015AB31BC1AE4800961A06 /* AppDelegate.m in Sources */, + DC015B4A1BC5A70300961A06 /* List+CoreDataProperties.m in Sources */, + DC015B481BC5A70300961A06 /* Task+CoreDataProperties.m in Sources */, + DC015AE31BC1B95300961A06 /* ListsTableViewController.m in Sources */, + DC015B4B1BC5A70300961A06 /* List.m in Sources */, + 18D601571C9B13050085227C /* NSString+Length.m in Sources */, + DC015B491BC5A70300961A06 /* Task.m in Sources */, + DC015AEA1BC22F4C00961A06 /* TasksTableViewController.m in Sources */, + DC015AB01BC1AE4800961A06 /* main.m in Sources */, + DC015AE01BC1B91300961A06 /* ListCreationTableViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + DC015AB71BC1AE4800961A06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DC015AB81BC1AE4800961A06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + DC015ABF1BC1AE4800961A06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DC015AC01BC1AE4800961A06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + DC015AC31BC1AE4800961A06 /* 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; + }; + DC015AC41BC1AE4800961A06 /* 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; + }; + DC015AC61BC1AE4800961A06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWater/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nyc.c4q.mesbekmek.MarsWater; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + DC015AC71BC1AE4800961A06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MarsWater/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = nyc.c4q.mesbekmek.MarsWater; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DC015AA61BC1AE4800961A06 /* Build configuration list for PBXProject "MarsWater" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC015AC31BC1AE4800961A06 /* Debug */, + DC015AC41BC1AE4800961A06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DC015AC51BC1AE4800961A06 /* Build configuration list for PBXNativeTarget "MarsWater" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC015AC61BC1AE4800961A06 /* Debug */, + DC015AC71BC1AE4800961A06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + DC015ABA1BC1AE4800961A06 /* MarsWater.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + DC015ABB1BC1AE4800961A06 /* MarsWater.xcdatamodel */, + ); + currentVersion = DC015ABB1BC1AE4800961A06 /* MarsWater.xcdatamodel */; + path = MarsWater.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = DC015AA31BC1AE4800961A06 /* 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..fc01778 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 Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. 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..232a198 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 Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. 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.mesbekmek.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..3a13ddc --- /dev/null +++ b/MarsWater/MarsWater/Base.lproj/Main.storyboard @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..a54a702 --- /dev/null +++ b/MarsWater/MarsWater/List+CoreDataProperties.h @@ -0,0 +1,40 @@ +// +// List+CoreDataProperties.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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) id color; +@property (nullable, nonatomic, retain) NSDate *createdAt; +@property (nullable, nonatomic, retain) NSString *title; +@property (nullable, nonatomic, retain) NSOrderedSet *tasks; + +@end + +@interface List (CoreDataGeneratedAccessors) + +- (void)insertObject:(Task *)value inTasksAtIndex:(NSUInteger)idx; +- (void)removeObjectFromTasksAtIndex:(NSUInteger)idx; +- (void)insertTasks:(NSArray *)value atIndexes:(NSIndexSet *)indexes; +- (void)removeTasksAtIndexes:(NSIndexSet *)indexes; +- (void)replaceObjectInTasksAtIndex:(NSUInteger)idx withObject:(Task *)value; +- (void)replaceTasksAtIndexes:(NSIndexSet *)indexes withTasks:(NSArray *)values; +- (void)addTasksObject:(Task *)value; +- (void)removeTasksObject:(Task *)value; +- (void)addTasks:(NSOrderedSet *)values; +- (void)removeTasks:(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..c2d9465 --- /dev/null +++ b/MarsWater/MarsWater/List+CoreDataProperties.m @@ -0,0 +1,21 @@ +// +// List+CoreDataProperties.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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 color; +@dynamic createdAt; +@dynamic title; +@dynamic tasks; + +@end diff --git a/MarsWater/MarsWater/List.h b/MarsWater/MarsWater/List.h new file mode 100644 index 0000000..2795457 --- /dev/null +++ b/MarsWater/MarsWater/List.h @@ -0,0 +1,23 @@ +// +// List.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import +#import + +@class Task; + +NS_ASSUME_NONNULL_BEGIN + +@interface List : NSManagedObject + +-(NSString *)subtitleText; +@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..1ace21e --- /dev/null +++ b/MarsWater/MarsWater/List.m @@ -0,0 +1,21 @@ +// +// List.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import "List.h" +#import "Task.h" + +@implementation List + +-(NSString *)subtitleText{ + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + + dateFormatter.dateStyle = NSDateFormatterShortStyle; + + return [dateFormatter stringFromDate:self.createdAt]; +} +@end diff --git a/MarsWater/MarsWater/ListCreationTableViewController.h b/MarsWater/MarsWater/ListCreationTableViewController.h new file mode 100644 index 0000000..de05b1c --- /dev/null +++ b/MarsWater/MarsWater/ListCreationTableViewController.h @@ -0,0 +1,13 @@ +// +// ListCreationTableViewController.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. 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..c1923a2 --- /dev/null +++ b/MarsWater/MarsWater/ListCreationTableViewController.m @@ -0,0 +1,137 @@ +// +// ListCreationTableViewController.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import "ListCreationTableViewController.h" +#import "List.h" +#import "Task.h" +#import +#import "AppDelegate.h" +#import "NSString+Length.h" + +@interface ListCreationTableViewController () +@property (weak, nonatomic) IBOutlet UITextField *titleTextField; +@property (weak, nonatomic) IBOutlet UITextField *taskTextField; + +@property (nonatomic) UIColor *listColor; + +@end + +@implementation ListCreationTableViewController + +- (void)viewDidLoad { + + [super viewDidLoad]; + [self setupNavigationBar]; +} + +- (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)]; + + self.navigationController.navigationBar.backgroundColor = [UIColor colorWithRed:0.0/255 green:118.0/255 blue:255.0/255 alpha:1.0]; + [self.navigationController.navigationBar setTitleTextAttributes: + @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; + +} + +- (void)cancel { + + [self dismissViewControllerAnimated:YES completion:nil]; +} + +-(NSArray *)commaSeparatedTasksFromString:(NSString *)taskString { + + NSArray *commaSeparatedTasks = [taskString componentsSeparatedByString:@","]; + return commaSeparatedTasks; +} + +- (void)save { + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + NSString *title = self.titleTextField.text; + NSString *taskString = self.taskTextField.text; + + if([title isValid]) { + List *list = [NSEntityDescription insertNewObjectForEntityForName:@"List" inManagedObjectContext:delegate.managedObjectContext]; + if(self.listColor == nil) { + //assigns a default color to a list if user decides not assign one. + [list setValue:[UIColor colorWithRed:0.0/255 green:118.0/255 blue:255.0/255 alpha:1.0] forKey:@"color"]; + } + else { + [list setValue:self.listColor forKey:@"color"]; + } + [list setValue:title forKey:@"title"]; + [list setValue:[NSDate date] forKey:@"createdAt"]; + + if(taskString && taskString.length) { + //Checks to see if user has comma separated tasks or just one task + if([taskString rangeOfString:@","].location != NSNotFound) { + NSArray *commaSeparatedTasks = [self commaSeparatedTasksFromString:taskString]; + NSMutableOrderedSet *mutableSet = [list mutableOrderedSetValueForKey:@"tasks"]; + for(NSString *taskString in commaSeparatedTasks){ + Task *task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:delegate.managedObjectContext]; + [task setValue:taskString forKey:@"taskDescription"]; + [task setValue:[NSDate date] forKey:@"createdAt"]; + [mutableSet addObject:task]; + [list setValue:mutableSet forKey:@"tasks"]; + NSLog(@"These are your taskStrings: %@",task.taskDescription); + } + //there's only one task + } + else { + Task *task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:delegate.managedObjectContext]; + NSMutableOrderedSet *mutableSet = [list mutableOrderedSetValueForKey:@"tasks"]; + task.taskDescription = taskString; + task.createdAt = [NSDate date]; + [mutableSet addObject:task]; + [list setValue:mutableSet forKey:@"tasks"]; + } + } + NSError *error = nil; + if([list.title isValid]) { + if([delegate.managedObjectContext save:&error]){ + [self dismissViewControllerAnimated:YES completion:nil]; + } + else { + if(error) { + NSLog(@"Unable to save list"); + NSLog(@"%@ %@",error, error.localizedDescription); + } + [self alertWithMessage:@"Your to-do list could not be saved" andTitle:@"Warning/Error"]; + } + } + //there was no title + } + else { + [self alertWithMessage:@"You need to put a title before you save" andTitle:@"Hold up"]; + } +} + +#pragma mark - Alert Methods + +- (void)alertWithMessage:(NSString *)message andTitle:(NSString *)title { + + UIAlertController *controller = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + + [controller addAction:okAction]; + + [self presentViewController:controller animated:YES completion:nil]; +} + +- (IBAction)colorButtonTapped:(UIButton *)sender +{ + self.listColor = sender.backgroundColor; +} + + +@end diff --git a/MarsWater/MarsWater/ListsTableViewController.h b/MarsWater/MarsWater/ListsTableViewController.h new file mode 100644 index 0000000..f2028b0 --- /dev/null +++ b/MarsWater/MarsWater/ListsTableViewController.h @@ -0,0 +1,13 @@ +// +// ListsTableViewController.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import + +@interface ListsTableViewController : UITableViewController + +@end diff --git a/MarsWater/MarsWater/ListsTableViewController.m b/MarsWater/MarsWater/ListsTableViewController.m new file mode 100644 index 0000000..58c8b4e --- /dev/null +++ b/MarsWater/MarsWater/ListsTableViewController.m @@ -0,0 +1,201 @@ +// +// ListsTableViewController.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import "ListsTableViewController.h" +#import +#import "AppDelegate.h" +#import "List.h" +#import "TasksTableViewController.h" +#import "ListCreationTableViewController.h" + +@interface ListsTableViewController () + +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; + +@end + +@implementation ListsTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + [self setupNavBar]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + /* + //1) Fetching using a FetchRequest + + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; + NSEntityDescription *entity = [NSEntityDescription entityForName:@"List" inManagedObjectContext:delegate.managedObjectContext]; + [fetchRequest setEntity:entity]; + + // Specify how the fetched objects should be sorted + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"createdAt" ascending:YES]; + + [fetchRequest setSortDescriptors:@[sortDescriptor]]; + + NSError *error = nil; + NSArray *fetchedObjects = [delegate.managedObjectContext executeFetchRequest:fetchRequest error:&error]; + if (fetchedObjects == nil) { + NSLog(@"Could not fetch List Objects."); + NSLog(@"%@ %@", error, error.localizedDescription); + } + */ + //2) Fetching using a Fetched Results Controller (pro: has delegate methods) + + //create an instance of NSFetchRequest with an entity name + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"List"]; + + //create a sort descriptor + NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"createdAt" ascending:NO]; + + //set the sort descriptor on the fetch request + fetchRequest.sortDescriptors = @[sort]; + + //create a fetchedResultsController with a fetchRequest and a managedObjectContext + NSFetchedResultsController *fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:delegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; + + fetchedResultsController.delegate = self; + + self.fetchedResultsController = fetchedResultsController; + + NSError *error = nil; + if(![self.fetchedResultsController performFetch:nil]) + { + NSLog(@"Could not fetch List Objects."); + + NSLog(@"%@ %@", error, error.localizedDescription); + } + else + { + [self.tableView reloadData]; + } +} + +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + [self.tableView reloadData]; +} + +- (void)setupNavBar +{ + self.navigationController.navigationBar.backgroundColor = [UIColor colorWithRed:0.0/255 green:118.0/255 blue:255.0/255 alpha:1.0]; + + [self.navigationController.navigationBar setTitleTextAttributes: + @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return self.fetchedResultsController.sections.count; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + id sectionInfo = self.fetchedResultsController.sections[section]; + return [sectionInfo numberOfObjects]; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ListCellID" forIndexPath:indexPath]; + + List *list = self.fetchedResultsController.fetchedObjects[indexPath.row]; + cell.textLabel.text = list.title; + cell.detailTextLabel.text = [list subtitleText]; + cell.backgroundColor = (UIColor *)list.color; + return cell; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 100.0; +} + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +{ + return YES; +} + +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (editingStyle == UITableViewCellEditingStyleDelete) + { + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + List *list = [self.fetchedResultsController objectAtIndexPath:indexPath]; + [delegate.managedObjectContext deleteObject:list]; + } +} + + +#pragma mark - NSFetchedResultsController Delegate Methods + +- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller +{ + [self.tableView beginUpdates]; +} + +- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath +{ + + switch (type) + { + case NSFetchedResultsChangeInsert: + { + [self.tableView insertRowsAtIndexPaths:@[ newIndexPath ] withRowAnimation:UITableViewRowAnimationFade]; + break; + } + case NSFetchedResultsChangeDelete: + { + [self.tableView deleteRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationFade]; + break; + } + case NSFetchedResultsChangeUpdate: + { + [self.tableView reloadRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationNone]; + break; + } + case NSFetchedResultsChangeMove: + { + [self.tableView deleteRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationFade]; + + [self.tableView insertRowsAtIndexPaths:@[ newIndexPath ] withRowAnimation:UITableViewRowAnimationFade]; + } + break; + default: + break; + } +} +- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller +{ + [self.tableView endUpdates]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + if([segue.identifier isEqualToString:@"ShowTasks"]) + { + TasksTableViewController *tvc = (TasksTableViewController *)segue.destinationViewController; + + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + List *list = [self.fetchedResultsController objectAtIndexPath:indexPath]; + tvc.listAtIndexPath = list; + tvc.indexPath = indexPath; + } +} + +@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..d7729fc --- /dev/null +++ b/MarsWater/MarsWater/MarsWater.xcdatamodeld/MarsWater.xcdatamodel/contents @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MarsWater/MarsWater/NSString+Length.h b/MarsWater/MarsWater/NSString+Length.h new file mode 100644 index 0000000..fddae04 --- /dev/null +++ b/MarsWater/MarsWater/NSString+Length.h @@ -0,0 +1,15 @@ +// +// NSString+Length.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 3/17/16. +// Copyright © 2016 Mesfin. All rights reserved. +// + +#import + +@interface NSString (Length) + +- (BOOL)isValid; + +@end diff --git a/MarsWater/MarsWater/NSString+Length.m b/MarsWater/MarsWater/NSString+Length.m new file mode 100644 index 0000000..c6833a7 --- /dev/null +++ b/MarsWater/MarsWater/NSString+Length.m @@ -0,0 +1,30 @@ +// +// NSString+Length.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 3/17/16. +// Copyright © 2016 Mesfin. All rights reserved. +// + +#import "NSString+Length.h" + +@implementation NSString (Length) + +- (BOOL)isValid { + + if (self.length == 0) { + return NO; + } + + if (self == nil) { + return NO; + } + + if (![[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length]){ + return NO; + } + + return YES; +} + +@end diff --git a/MarsWater/MarsWater/Task+CoreDataProperties.h b/MarsWater/MarsWater/Task+CoreDataProperties.h new file mode 100644 index 0000000..be7223d --- /dev/null +++ b/MarsWater/MarsWater/Task+CoreDataProperties.h @@ -0,0 +1,28 @@ +// +// Task+CoreDataProperties.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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) NSDate *completedAt; +@property (nullable, nonatomic, retain) NSDate *createdAt; +@property (nullable, nonatomic, retain) NSDate *dueAt; +@property (nullable, nonatomic, retain) NSNumber *priority; +@property (nullable, nonatomic, retain) NSString *taskDescription; +@property (nullable, nonatomic, retain) NSDate *updatedAt; +@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..69fa0de --- /dev/null +++ b/MarsWater/MarsWater/Task+CoreDataProperties.m @@ -0,0 +1,24 @@ +// +// Task+CoreDataProperties.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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 completedAt; +@dynamic createdAt; +@dynamic dueAt; +@dynamic priority; +@dynamic taskDescription; +@dynamic updatedAt; +@dynamic list; + +@end diff --git a/MarsWater/MarsWater/Task.h b/MarsWater/MarsWater/Task.h new file mode 100644 index 0000000..190c3a4 --- /dev/null +++ b/MarsWater/MarsWater/Task.h @@ -0,0 +1,24 @@ +// +// Task.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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..d353c76 --- /dev/null +++ b/MarsWater/MarsWater/Task.m @@ -0,0 +1,16 @@ +// +// Task.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/7/15. +// Copyright © 2015 Mesfin. 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/TasksTableViewController.h b/MarsWater/MarsWater/TasksTableViewController.h new file mode 100644 index 0000000..1ea025c --- /dev/null +++ b/MarsWater/MarsWater/TasksTableViewController.h @@ -0,0 +1,17 @@ +// +// TasksTableViewController.h +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/5/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import +#import "Task.h" + +@interface TasksTableViewController : UITableViewController + +@property (nonatomic) List *listAtIndexPath; +@property (nonatomic) NSIndexPath *indexPath; + +@end diff --git a/MarsWater/MarsWater/TasksTableViewController.m b/MarsWater/MarsWater/TasksTableViewController.m new file mode 100644 index 0000000..2299cf0 --- /dev/null +++ b/MarsWater/MarsWater/TasksTableViewController.m @@ -0,0 +1,243 @@ +// +// TasksTableViewController.m +// MarsWater +// +// Created by Mesfin Bekele Mekonnen on 10/5/15. +// Copyright © 2015 Mesfin. All rights reserved. +// + +#import "TasksTableViewController.h" +#import +#import "AppDelegate.h" +#import "Task.h" +#import "List.h" +@interface TasksTableViewController () + +@property (nonatomic) NSFetchedResultsController *fetchedResultsController; +@property (nonatomic) Task *task; +@property (nonatomic) List *list; + +@property (nonatomic) NSMutableArray *tasksArray; +@end + +@implementation TasksTableViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + [self setupNavBar]; + self.tableView.rowHeight = 100; + + self.tasksArray = [NSMutableArray arrayWithArray:[self.listAtIndexPath.tasks array]]; + NSLog(@"Tasks Array Count: %lu",(unsigned long)self.tasksArray.count); + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + ////create an instance of NSFetchRequest with an entity name + NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"List"]; + + //create a sort descriptor + NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"createdAt" ascending:NO]; + + //set the sort descriptor on the fetch request + fetchRequest.sortDescriptors = @[sort]; + + //create a fetchedResultsController with a fetchRequest and a managedObjectContext + NSFetchedResultsController *fetchedResutlsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:delegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; + + fetchedResutlsController.delegate = self; + + self.fetchedResultsController = fetchedResutlsController; + + NSError *error = nil; + if(![self.fetchedResultsController performFetch:&error]) + { + NSLog(@"Could not Load Task Entity"); + NSLog(@"%@ %@",error, error.localizedDescription); + }else{ + self.list = [self.fetchedResultsController objectAtIndexPath:self.indexPath]; + [self.tableView reloadData]; + } + // }else + // { + // NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + // self.list = [self.fetchedResultsController objectAtIndexPath:indexPath]; + // [self.tableView reloadData]; + // } + +} + +- (void)setupNavBar +{ + self.navigationItem.title = @"Tasks"; + self.navigationController.navigationBar.backgroundColor = [UIColor colorWithRed:0.0/255 green:118.0/255 blue:255.0/255 alpha:1.0]; + [self.navigationController.navigationBar setTitleTextAttributes: + @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; +} + +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + [self.tableView reloadData]; +} + + +#pragma mark - Table view data source +// +//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +//{ +// return 1; +//} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.listAtIndexPath.tasks.count; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TasksCellID" forIndexPath:indexPath]; + + //Task *task = [self.fetchedResultsController objectAtIndexPath:indexPath]; + //List *list = [self.fetchedResultsController objectAtIndexPath:self.indexPath ]; + if(self.listAtIndexPath.tasks.count > 0){ + Task *task = self.listAtIndexPath.tasks[indexPath.row]; + cell.textLabel.text = task.taskDescription; + } + return cell; +} + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +{ + return YES; +} + +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (editingStyle == UITableViewCellEditingStyleDelete) + { + // //AppDelegate *delegate = [UIApplication sharedApplication].delegate; + // List *list= self.listAtIndexPath; + // + // + // Task *task = list.tasks[indexPath.row]; + // + // //might need to change this to delegate.context + // [task.managedObjectContext deleteObject:task]; + + //Task *task = [self.fetchedResultsController objectAtIndexPath:indexPath]; + + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + List *list = [self.fetchedResultsController objectAtIndexPath:self.indexPath]; + Task *task = [list.tasks objectAtIndex:indexPath.row]; + NSMutableOrderedSet *ms = [list mutableOrderedSetValueForKey:@"tasks"]; + [ms removeObject:task]; + self.listAtIndexPath.tasks = ms; + // NSMutableOrderedSet *set = list.tasks.mutableCopy; + // [set removeObjectAtIndex:indexPath.row]; + // list.tasks = set; + + // NSArray tasksArray = + // NSMutableArray *taskArray = [NSMutableArray arrayWithArray:[list.tasks array]]; + // + // [taskArray removeObject:task]; + // NSOrderedSet *set = [[NSOrderedSet alloc] initWithArray:taskArray]; + + [list setValue:ms forKey:@"tasks"]; + + [delegate.managedObjectContext deleteObject:task]; + + [delegate.managedObjectContext save:nil]; + + [self.tableView reloadData]; + + + } + +} + +- (IBAction)addTasksButtonTapped:(UIBarButtonItem *)sender +{ + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"New Task" message:@"Please Enter A New Task" preferredStyle:UIAlertControllerStyleAlert]; + [alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField){ + textField.placeholder = NSLocalizedString(@"Enter Task", @"NewTaskPlaceHolder"); + }]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK action") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) + { + AppDelegate *delegate = [UIApplication sharedApplication].delegate; + + List *list = [self.fetchedResultsController objectAtIndexPath:self.indexPath]; + + Task *task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:delegate.managedObjectContext]; + + + task.taskDescription = alertController.textFields.firstObject.text; + task.createdAt = [NSDate date]; + + + NSMutableOrderedSet *ms = [list mutableOrderedSetValueForKey:@"tasks"]; + [ms addObject:task]; + self.listAtIndexPath.tasks = ms; + + [list setValue:ms forKey:@"tasks"]; + + [delegate.managedObjectContext insertObject:task]; + + [delegate.managedObjectContext save:nil]; + + [self.tableView reloadData]; + + + [self dismissViewControllerAnimated:YES completion:nil]; + + }]; + + [alertController addAction:okAction]; + [self presentViewController:alertController animated:YES completion:nil]; +} + +#pragma mark - + +//- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller +//{ +// [self.tableView beginUpdates]; +//} +// +//- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath{ +// +// switch (type) { +// case NSFetchedResultsChangeDelete: { +// [self.tableView deleteRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationAutomatic]; +// break; +// } +// case NSFetchedResultsChangeInsert: { +// [self.tableView insertRowsAtIndexPaths:@[ newIndexPath ] withRowAnimation:UITableViewRowAnimationAutomatic]; +// break; +// } +// case NSFetchedResultsChangeUpdate: { +// [self.tableView reloadRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationNone]; +// break; +// } +// case NSFetchedResultsChangeMove:{ +// [self.tableView moveRowAtIndexPath:indexPath toIndexPath:newIndexPath]; +// break; +// } +// default: { +// break; +// } +// } +//} +// +//- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller +//{ +// [self.tableView endUpdates]; +//} + +@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..6856105 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 Mesfin Bekele Mekonnen on 10/4/15. +// Copyright © 2015 Mesfin. All rights reserved. // #import diff --git a/README.md b/README.md index bd3a617..2f42b54 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # unit-2-hw-3 -To-do Core Data +To-do List that uses Core Data to persist data. 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