Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added MarsWater/.DS_Store
Binary file not shown.
40 changes: 35 additions & 5 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 */; };
EB6E7B1D1BC5DCC000A07298 /* TaskTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB6E7B1C1BC5DCC000A07298 /* TaskTableViewController.m */; settings = {ASSET_TAGS = (); }; };
EB6E7B251BC5F7C500A07298 /* TableCreationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB6E7B241BC5F7C500A07298 /* TableCreationViewController.m */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -43,6 +45,11 @@
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>"; };
EB6E7B1B1BC5DCC000A07298 /* TaskTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskTableViewController.h; sourceTree = "<group>"; };
EB6E7B1C1BC5DCC000A07298 /* TaskTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskTableViewController.m; sourceTree = "<group>"; };
EB6E7B231BC5F7C500A07298 /* TableCreationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableCreationViewController.h; sourceTree = "<group>"; };
EB6E7B241BC5F7C500A07298 /* TableCreationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableCreationViewController.m; sourceTree = "<group>"; };
EBC201A01BC75B0E009F719F /* TaskCreationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskCreationDelegate.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -76,13 +83,11 @@
isa = PBXGroup;
children = (
8DA86CD11BC1B329006C50BC /* Model */,
8DA86CB01BC1AE57006C50BC /* Main.storyboard */,
8DA86CAA1BC1AE57006C50BC /* AppDelegate.h */,
8DA86CAB1BC1AE57006C50BC /* AppDelegate.m */,
8DA86CD21BC1B8E4006C50BC /* ListsTableViewController.h */,
8DA86CD31BC1B8E4006C50BC /* ListsTableViewController.m */,
8DA86CD51BC1B904006C50BC /* ListCreationTableViewController.h */,
8DA86CD61BC1B904006C50BC /* ListCreationTableViewController.m */,
8DA86CB01BC1AE57006C50BC /* Main.storyboard */,
EB6E7B211BC5ED2000A07298 /* lists */,
EB6E7B221BC5ED3D00A07298 /* task */,
8DA86CB61BC1AE57006C50BC /* Assets.xcassets */,
8DA86CB81BC1AE57006C50BC /* LaunchScreen.storyboard */,
8DA86CBB1BC1AE57006C50BC /* Info.plist */,
Expand Down Expand Up @@ -115,6 +120,29 @@
name = Model;
sourceTree = "<group>";
};
EB6E7B211BC5ED2000A07298 /* lists */ = {
isa = PBXGroup;
children = (
8DA86CD21BC1B8E4006C50BC /* ListsTableViewController.h */,
8DA86CD31BC1B8E4006C50BC /* ListsTableViewController.m */,
8DA86CD51BC1B904006C50BC /* ListCreationTableViewController.h */,
8DA86CD61BC1B904006C50BC /* ListCreationTableViewController.m */,
);
name = lists;
sourceTree = "<group>";
};
EB6E7B221BC5ED3D00A07298 /* task */ = {
isa = PBXGroup;
children = (
EB6E7B1B1BC5DCC000A07298 /* TaskTableViewController.h */,
EB6E7B1C1BC5DCC000A07298 /* TaskTableViewController.m */,
EB6E7B231BC5F7C500A07298 /* TableCreationViewController.h */,
EB6E7B241BC5F7C500A07298 /* TableCreationViewController.m */,
EBC201A01BC75B0E009F719F /* TaskCreationDelegate.h */,
);
name = task;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -187,10 +215,12 @@
files = (
8DA86CB51BC1AE57006C50BC /* MarsWater.xcdatamodeld in Sources */,
8DA86CAC1BC1AE57006C50BC /* AppDelegate.m in Sources */,
EB6E7B1D1BC5DCC000A07298 /* TaskTableViewController.m in Sources */,
8DB2F6EA1BC1E75500E58E65 /* Task+CoreDataProperties.m in Sources */,
8DA86CD41BC1B8E4006C50BC /* ListsTableViewController.m in Sources */,
8DB2F6E71BC1E75500E58E65 /* List.m in Sources */,
8DB2F6E91BC1E75500E58E65 /* Task.m in Sources */,
EB6E7B251BC5F7C500A07298 /* TableCreationViewController.m in Sources */,
8DA86CD71BC1B904006C50BC /* ListCreationTableViewController.m in Sources */,
8DA86CA91BC1AE57006C50BC /* main.m in Sources */,
8DB2F6E81BC1E75500E58E65 /* List+CoreDataProperties.m in Sources */,
Expand Down
106 changes: 99 additions & 7 deletions MarsWater/MarsWater/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="OKe-ND-dH3">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="OKe-ND-dH3">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
Expand All @@ -26,21 +26,24 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v9C-RD-f0m">
<rect key="frame" x="15" y="25" width="41" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<animations/>
</tableViewCellContentView>
<animations/>
<connections>
<segue destination="7rU-aM-qu4" kind="show" id="Nqn-DU-mhW"/>
</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="1736" y="355"/>
</scene>
<!--List Creation Table View Controller-->
<scene sceneID="Nx5-Rb-hgB">
Expand All @@ -85,7 +88,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<sections>
<tableViewSection id="fjY-Uh-Pld">
<cells>
Expand All @@ -100,7 +103,7 @@
<rect key="frame" x="15" y="11" width="38" height="21"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pGs-E0-Itl">
Expand Down Expand Up @@ -213,7 +216,96 @@
</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="2449" y="355"/>
</scene>
<!--Task Table View Controller-->
<scene sceneID="Vte-7M-r1q">
<objects>
<tableViewController id="7rU-aM-qu4" customClass="TaskTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="mga-VQ-8xy">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TaskCellIdentifier" id="aye-X6-zNq">
<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="aye-X6-zNq" id="uDx-3I-4ys">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="7rU-aM-qu4" id="d7F-Bw-iZE"/>
<outlet property="delegate" destination="7rU-aM-qu4" id="X0P-0f-pgH"/>
</connections>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" id="BtK-wP-whX">
<barButtonItem key="rightBarButtonItem" systemItem="add" id="oNS-9I-Tno">
<connections>
<action selector="moveToTaskCreationPageButton:" destination="7rU-aM-qu4" id="Fuh-3T-0lY"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vB1-yi-VJI" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="988" y="-356"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="tUs-2O-gaB">
<objects>
<navigationController id="FqI-kn-z3E" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="WuK-b7-S0y">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="1qO-uc-4O9" kind="relationship" relationship="rootViewController" id="0uj-z0-2VT"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="3Cr-1v-z0q" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1686" y="-356"/>
</scene>
<!--Table Creation View Controller-->
<scene sceneID="onP-03-gvd">
<objects>
<viewController storyboardIdentifier="TableCreationVC" id="1qO-uc-4O9" customClass="TableCreationViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="5bH-vX-xdr"/>
<viewControllerLayoutGuide type="bottom" id="t0J-tC-xRI"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="SiL-Cf-JeF">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="enter task here" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ony-3p-s2R">
<rect key="frame" x="20" y="285" width="560" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="560" id="OUK-dh-Ilr"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="ony-3p-s2R" firstAttribute="centerY" secondItem="SiL-Cf-JeF" secondAttribute="centerY" id="sfm-QG-bXq"/>
<constraint firstItem="ony-3p-s2R" firstAttribute="centerX" secondItem="SiL-Cf-JeF" secondAttribute="centerX" id="tAJ-mx-2Vx"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="OPR-pZ-Hso"/>
<connections>
<outlet property="taskTextField" destination="ony-3p-s2R" id="jRf-T1-kvn"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="T5y-Et-DG4" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2507" y="-390"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="5nr-jx-cZX">
Expand Down
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
11 changes: 10 additions & 1 deletion MarsWater/MarsWater/ListsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "ListsTableViewController.h"
#import "AppDelegate.h"
#import "List.h"

#import "TaskTableViewController.h"
@interface ListsTableViewController () <NSFetchedResultsControllerDelegate>

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

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
TaskTableViewController *tbv = segue.destinationViewController;
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
List *list = [self.fetchedResultsController objectAtIndexPath:indexPath];

tbv.list = list;
tbv.indexPath = indexPath;
}

@end

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

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

@interface TableCreationViewController : UIViewController

@property (nonatomic, weak) id<TaskCreationDelegate> delegate;


@end
Loading