Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished! #17

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
12 changes: 12 additions & 0 deletions MarsWater/MarsWater.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
8DB2F6E81BC1E75500E58E65 /* List+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DB2F6E21BC1E75500E58E65 /* List+CoreDataProperties.m */; };
8DB2F6E91BC1E75500E58E65 /* Task.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DB2F6E41BC1E75500E58E65 /* Task.m */; };
8DB2F6EA1BC1E75500E58E65 /* Task+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DB2F6E61BC1E75500E58E65 /* Task+CoreDataProperties.m */; };
ABF463FB1BC5F24C0054CE11 /* TasksTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABF463FA1BC5F24C0054CE11 /* TasksTableViewController.m */; settings = {ASSET_TAGS = (); }; };
ABF463FE1BC600E70054CE11 /* TaskCreationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABF463FD1BC600E70054CE11 /* TaskCreationViewController.m */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -43,6 +45,10 @@
8DB2F6E41BC1E75500E58E65 /* Task.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Task.m; sourceTree = "<group>"; };
8DB2F6E51BC1E75500E58E65 /* Task+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Task+CoreDataProperties.h"; sourceTree = "<group>"; };
8DB2F6E61BC1E75500E58E65 /* Task+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Task+CoreDataProperties.m"; sourceTree = "<group>"; };
ABF463F91BC5F24C0054CE11 /* TasksTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksTableViewController.h; sourceTree = "<group>"; };
ABF463FA1BC5F24C0054CE11 /* TasksTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksTableViewController.m; sourceTree = "<group>"; };
ABF463FC1BC600E70054CE11 /* TaskCreationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskCreationViewController.h; sourceTree = "<group>"; };
ABF463FD1BC600E70054CE11 /* TaskCreationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskCreationViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -82,6 +88,10 @@
8DA86CD31BC1B8E4006C50BC /* ListsTableViewController.m */,
8DA86CD51BC1B904006C50BC /* ListCreationTableViewController.h */,
8DA86CD61BC1B904006C50BC /* ListCreationTableViewController.m */,
ABF463F91BC5F24C0054CE11 /* TasksTableViewController.h */,
ABF463FA1BC5F24C0054CE11 /* TasksTableViewController.m */,
ABF463FC1BC600E70054CE11 /* TaskCreationViewController.h */,
ABF463FD1BC600E70054CE11 /* TaskCreationViewController.m */,
8DA86CB01BC1AE57006C50BC /* Main.storyboard */,
8DA86CB61BC1AE57006C50BC /* Assets.xcassets */,
8DA86CB81BC1AE57006C50BC /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -189,8 +199,10 @@
8DA86CAC1BC1AE57006C50BC /* AppDelegate.m in Sources */,
8DB2F6EA1BC1E75500E58E65 /* Task+CoreDataProperties.m in Sources */,
8DA86CD41BC1B8E4006C50BC /* ListsTableViewController.m in Sources */,
ABF463FE1BC600E70054CE11 /* TaskCreationViewController.m in Sources */,
8DB2F6E71BC1E75500E58E65 /* List.m in Sources */,
8DB2F6E91BC1E75500E58E65 /* Task.m in Sources */,
ABF463FB1BC5F24C0054CE11 /* TasksTableViewController.m in Sources */,
8DA86CD71BC1B904006C50BC /* ListCreationTableViewController.m in Sources */,
8DA86CA91BC1AE57006C50BC /* main.m in Sources */,
8DB2F6E81BC1E75500E58E65 /* List+CoreDataProperties.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "6DE2C1D134E7E42733C08A7A796A852DF2F0373A",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"A3AEDD975711D11A3C07EE12753FF388EB8DBC2D" : 0,
"6DE2C1D134E7E42733C08A7A796A852DF2F0373A" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "DF0F57E6-66E2-436C-A7A3-E0FAA1F6209B",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"A3AEDD975711D11A3C07EE12753FF388EB8DBC2D" : "",
"6DE2C1D134E7E42733C08A7A796A852DF2F0373A" : "unit-2-hw-3\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "MarsWater",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SavingForever\/MarsWater.xcodeproj",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bereket6725\/unit-2-hw-3.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "6DE2C1D134E7E42733C08A7A796A852DF2F0373A"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bereket6725\/presetTimerRepo.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A3AEDD975711D11A3C07EE12753FF388EB8DBC2D"
}
]
}
135 changes: 133 additions & 2 deletions MarsWater/MarsWater/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<animations/>
</tableViewCellContentView>
<animations/>
<connections>
<segue destination="8n5-5T-IVS" kind="show" identifier="TasksSegueIdentifer" id="0uV-rq-12d"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
Expand Down Expand Up @@ -75,7 +78,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="1Mx-vf-Pe1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1760" y="205"/>
<point key="canvasLocation" x="1968" y="189"/>
</scene>
<!--List Creation Table View Controller-->
<scene sceneID="Nx5-Rb-hgB">
Expand Down Expand Up @@ -213,7 +216,97 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LXj-oa-ep0" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2405" y="205"/>
<point key="canvasLocation" x="2885" y="195"/>
</scene>
<!--Task Creation View Controller-->
<scene sceneID="btb-UQ-BBm">
<objects>
<viewController id="ymX-Lf-Dbb" customClass="TaskCreationViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ouz-rO-Ppu"/>
<viewControllerLayoutGuide type="bottom" id="gEN-3u-XuH"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="0XR-kX-ejy">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YVU-bz-z9O">
<rect key="frame" x="0.0" y="20" width="600" height="580"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="CNo-qL-eE5">
<rect key="frame" x="40" y="80" width="528" height="30"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<animations/>
<color key="backgroundColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="tintColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="CNo-qL-eE5" firstAttribute="leading" secondItem="YVU-bz-z9O" secondAttribute="leading" constant="40" id="hoG-D1-tcK"/>
<constraint firstAttribute="trailing" secondItem="CNo-qL-eE5" secondAttribute="trailing" constant="32" id="meF-ai-JFD"/>
<constraint firstItem="CNo-qL-eE5" firstAttribute="top" secondItem="YVU-bz-z9O" secondAttribute="top" constant="80" id="vD8-Ba-VW4"/>
</constraints>
</view>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="YVU-bz-z9O" firstAttribute="top" secondItem="Ouz-rO-Ppu" secondAttribute="bottom" id="EMe-T4-9LJ"/>
<constraint firstAttribute="trailing" secondItem="YVU-bz-z9O" secondAttribute="trailing" id="UGE-G8-QTC"/>
<constraint firstItem="gEN-3u-XuH" firstAttribute="top" secondItem="YVU-bz-z9O" secondAttribute="bottom" id="hqx-np-sY8"/>
<constraint firstItem="YVU-bz-z9O" firstAttribute="leading" secondItem="0XR-kX-ejy" secondAttribute="leading" id="i7O-ai-KfE"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="U3V-oR-iDR"/>
<connections>
<outlet property="addTaskTextField" destination="CNo-qL-eE5" id="BSQ-ED-yG9"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="FK6-E0-pDx" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3674" y="1293"/>
</scene>
<!--Tasks Table View Controller-->
<scene sceneID="DLT-ZN-Qea">
<objects>
<tableViewController id="H4e-Bq-rRz" customClass="TasksTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="dCB-Qg-oVg">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TaskCellIdentifier" id="iwt-vB-oP2">
<rect key="frame" x="0.0" y="92" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iwt-vB-oP2" id="yJF-Fa-IsQ">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</tableViewCellContentView>
<animations/>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="H4e-Bq-rRz" id="wlV-CI-4D9"/>
<outlet property="delegate" destination="H4e-Bq-rRz" id="DiG-et-yCT"/>
</connections>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" id="fu2-zs-KSy">
<barButtonItem key="rightBarButtonItem" title="ADD A TASK" id="G7q-cE-V00">
<connections>
<segue destination="gI7-xg-Mtg" kind="presentation" identifier="TaskCreateSegue" id="4Bj-Wh-cgb"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ifb-2v-bHL" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1975" y="1293"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="5nr-jx-cZX">
Expand All @@ -232,5 +325,43 @@
</objects>
<point key="canvasLocation" x="193" y="355"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="PjE-m1-Mpg">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="8n5-5T-IVS" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="IxI-bA-aAF">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="H4e-Bq-rRz" kind="relationship" relationship="rootViewController" id="VQM-pU-vcG"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="5Cl-hw-9UA" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1027" y="1301"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="r76-9V-aEQ">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="gI7-xg-Mtg" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="evs-AX-tdd">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="ymX-Lf-Dbb" kind="relationship" relationship="rootViewController" id="vIC-p7-Of9"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hcv-zP-j8H" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2829" y="1301"/>
</scene>
</scenes>
</document>
2 changes: 1 addition & 1 deletion MarsWater/MarsWater/List+CoreDataProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, retain) NSString *title;
@property (nullable, nonatomic, retain) NSDate *createdAt;
@property (nullable, nonatomic, retain) id color;
@property (nullable, nonatomic, retain) NSArray *task;
@property (nullable, nonatomic, retain) NSOrderedSet *task;

@end

Expand Down
8 changes: 8 additions & 0 deletions MarsWater/MarsWater/ListCreationTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "ListCreationTableViewController.h"
#import "List.h"
#import "AppDelegate.h"
#import "TasksTableViewController.h"

@interface ListCreationTableViewController ()

Expand Down Expand Up @@ -60,4 +61,11 @@ - (IBAction)colorButtonTapped:(UIButton *)sender {
self.list.color = sender.backgroundColor;
}


//-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
//
//
//
//}

@end
3 changes: 3 additions & 0 deletions MarsWater/MarsWater/ListsTableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//

#import <UIKit/UIKit.h>
#import "List.h"

@interface ListsTableViewController : UITableViewController

@property (nonatomic) List *list;

@end
24 changes: 23 additions & 1 deletion MarsWater/MarsWater/ListsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#import <CoreData/CoreData.h>
#import "ListsTableViewController.h"
#import "AppDelegate.h"
#import "List.h"
#import "TasksTableViewController.h"
#import "ListCreationTableViewController.h"

@interface ListsTableViewController () <NSFetchedResultsControllerDelegate>

Expand Down Expand Up @@ -72,5 +73,26 @@ - (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)
[self.tableView reloadData];
}


-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{


if([segue.identifier isEqual: @"TasksSegueIdentifer"]){

UINavigationController* navigationController = segue.destinationViewController;

TasksTableViewController* tableViewController = navigationController.childViewControllers[0];
NSIndexPath* indexPath = [self.tableView indexPathForSelectedRow];
self.list = self.fetchedResultsController.fetchedObjects[indexPath.row];

tableViewController.list = self.list;

NSLog(@"List Passed: %@",self.list);

}

}


@end

24 changes: 24 additions & 0 deletions MarsWater/MarsWater/TaskCreationViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// TaskCreationViewController.h
// MarsWater
//
// Created by Bereket on 10/7/15.
// Copyright © 2015 Michael Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "TasksTableViewController.h"
#import <CoreData/CoreData.h>
#import "Task.h"
#import "List.h"

@interface TaskCreationViewController : UIViewController

<UITextFieldDelegate>


@property (strong, nonatomic) IBOutlet UITextField *addTaskTextField;
@property (nonatomic) Task* task;
@property (nonatomic) List* list;
@end
Loading