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 Requirements #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
34 changes: 28 additions & 6 deletions OptionSelector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
objects = {

/* Begin PBXBuildFile section */
45F503151B7AAA2E004C5DD4 /* SummaryTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F503141B7AAA2E004C5DD4 /* SummaryTableViewController.m */; };
45F503181B7AAA69004C5DD4 /* OptionsSelectTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F503171B7AAA69004C5DD4 /* OptionsSelectTableViewController.m */; };
45F5031B1B7AAD8C004C5DD4 /* ListData.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F5031A1B7AAD8C004C5DD4 /* ListData.m */; };
45F503501B7C71BB004C5DD4 /* ListInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 45F5034F1B7C71BB004C5DD4 /* ListInstance.m */; };
8DECE7921B78082B0064D760 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DECE7911B78082B0064D760 /* main.m */; };
8DECE7951B78082B0064D760 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DECE7941B78082B0064D760 /* AppDelegate.m */; };
8DECE7981B78082B0064D760 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DECE7971B78082B0064D760 /* ViewController.m */; };
8DECE79B1B78082B0064D760 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DECE7991B78082B0064D760 /* Main.storyboard */; };
8DECE79D1B78082B0064D760 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DECE79C1B78082B0064D760 /* Images.xcassets */; };
8DECE7A01B78082B0064D760 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8DECE79E1B78082B0064D760 /* LaunchScreen.xib */; };
Expand All @@ -27,13 +30,20 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
45F503101B7AA9F9004C5DD4 /* SummaryTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SummaryTableViewController.h; sourceTree = "<group>"; };
45F503131B7AAA2E004C5DD4 /* SummaryTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SummaryTableViewController.h; sourceTree = "<group>"; };
45F503141B7AAA2E004C5DD4 /* SummaryTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SummaryTableViewController.m; sourceTree = "<group>"; };
45F503161B7AAA69004C5DD4 /* OptionsSelectTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionsSelectTableViewController.h; sourceTree = "<group>"; };
45F503171B7AAA69004C5DD4 /* OptionsSelectTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionsSelectTableViewController.m; sourceTree = "<group>"; };
45F503191B7AAD8C004C5DD4 /* ListData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListData.h; sourceTree = "<group>"; };
45F5031A1B7AAD8C004C5DD4 /* ListData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListData.m; sourceTree = "<group>"; };
45F5034E1B7C71BB004C5DD4 /* ListInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListInstance.h; sourceTree = "<group>"; };
45F5034F1B7C71BB004C5DD4 /* ListInstance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListInstance.m; sourceTree = "<group>"; };
8DECE78C1B78082B0064D760 /* OptionSelector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OptionSelector.app; sourceTree = BUILT_PRODUCTS_DIR; };
8DECE7901B78082B0064D760 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DECE7911B78082B0064D760 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8DECE7931B78082B0064D760 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8DECE7941B78082B0064D760 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
8DECE7961B78082B0064D760 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
8DECE7971B78082B0064D760 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
8DECE79A1B78082B0064D760 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8DECE79C1B78082B0064D760 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
8DECE79F1B78082B0064D760 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -63,6 +73,7 @@
8DECE7831B78082B0064D760 = {
isa = PBXGroup;
children = (
45F503101B7AA9F9004C5DD4 /* SummaryTableViewController.h */,
8DECE78E1B78082B0064D760 /* OptionSelector */,
8DECE7A81B78082B0064D760 /* OptionSelectorTests */,
8DECE78D1B78082B0064D760 /* Products */,
Expand All @@ -83,8 +94,14 @@
children = (
8DECE7931B78082B0064D760 /* AppDelegate.h */,
8DECE7941B78082B0064D760 /* AppDelegate.m */,
8DECE7961B78082B0064D760 /* ViewController.h */,
8DECE7971B78082B0064D760 /* ViewController.m */,
45F503191B7AAD8C004C5DD4 /* ListData.h */,
45F5031A1B7AAD8C004C5DD4 /* ListData.m */,
45F5034E1B7C71BB004C5DD4 /* ListInstance.h */,
45F5034F1B7C71BB004C5DD4 /* ListInstance.m */,
45F503131B7AAA2E004C5DD4 /* SummaryTableViewController.h */,
45F503141B7AAA2E004C5DD4 /* SummaryTableViewController.m */,
45F503161B7AAA69004C5DD4 /* OptionsSelectTableViewController.h */,
45F503171B7AAA69004C5DD4 /* OptionsSelectTableViewController.m */,
8DECE7991B78082B0064D760 /* Main.storyboard */,
8DECE79C1B78082B0064D760 /* Images.xcassets */,
8DECE79E1B78082B0064D760 /* LaunchScreen.xib */,
Expand Down Expand Up @@ -219,8 +236,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DECE7981B78082B0064D760 /* ViewController.m in Sources */,
45F503181B7AAA69004C5DD4 /* OptionsSelectTableViewController.m in Sources */,
8DECE7951B78082B0064D760 /* AppDelegate.m in Sources */,
45F503151B7AAA2E004C5DD4 /* SummaryTableViewController.m in Sources */,
45F5031B1B7AAD8C004C5DD4 /* ListData.m in Sources */,
45F503501B7C71BB004C5DD4 /* ListInstance.m in Sources */,
8DECE7921B78082B0064D760 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -418,6 +438,7 @@
8DECE7B11B78082B0064D760 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DECE7B21B78082B0064D760 /* Build configuration list for PBXNativeTarget "OptionSelectorTests" */ = {
isa = XCConfigurationList;
Expand All @@ -426,6 +447,7 @@
8DECE7B41B78082B0064D760 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
99 changes: 84 additions & 15 deletions OptionSelector/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,94 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vlL-0U-kEo">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<!--Root View Controller-->
<scene sceneID="2FP-CV-dzu">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<tableViewController id="7kF-u7-Dmt" customClass="SummaryTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="efZ-4a-AmU">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CategoryCellIdentifier" textLabel="P3a-4X-BaZ" detailTextLabel="UPl-pG-RZJ" style="IBUITableViewCellStyleValue1" id="Btm-Gm-Eol">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Btm-Gm-Eol" id="XPr-RY-48n">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="P3a-4X-BaZ">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="UPl-pG-RZJ">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="uuR-xe-MBV" kind="show" id="KT6-AL-z62"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="7kF-u7-Dmt" id="CiB-Qq-zGS"/>
<outlet property="delegate" destination="7kF-u7-Dmt" id="dmZ-dR-Gh0"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Root View Controller" id="QIU-dz-aPb"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="0f2-JX-LEp" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="865" y="227"/>
</scene>
<!--Options Select Table View Controller-->
<scene sceneID="0g1-Lx-Y4C">
<objects>
<tableViewController id="uuR-xe-MBV" customClass="OptionsSelectTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="o62-yo-kGw">
<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 contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="OptionsCellIdentifier" id="6ZM-2a-PsH">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6ZM-2a-PsH" id="UTj-kr-aOK">
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="uuR-xe-MBV" id="Np7-K8-MAi"/>
<outlet property="delegate" destination="uuR-xe-MBV" id="wvD-sR-byV"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="UU7-LF-rdQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1550" y="227"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="bcE-Ob-Gy5">
<objects>
<navigationController id="vlL-0U-kEo" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="YgE-gi-v4W">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="7kF-u7-Dmt" kind="relationship" relationship="rootViewController" id="IqQ-vX-ELF"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4YM-Ad-Fay" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="45" y="227"/>
</scene>
</scenes>
</document>
18 changes: 18 additions & 0 deletions OptionSelector/ListData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// ListData.h
// OptionSelector
//
// Created by Chris David on 8/11/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ListData : NSObject

@property (nonatomic) NSString *name;
@property (nonatomic) NSString *selection;
@property (nonatomic) NSArray *options;
@property (nonatomic) NSUInteger index;

@end
13 changes: 13 additions & 0 deletions OptionSelector/ListData.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// ListData.m
// OptionSelector
//
// Created by Chris David on 8/11/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import "ListData.h"

@implementation ListData

@end
19 changes: 19 additions & 0 deletions OptionSelector/ListInstance.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// ListInstance.h
// OptionSelector
//
// Created by Chris David on 8/13/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ListInstance : NSObject

@property (nonatomic) NSMutableArray *allCategories;

-(void) initializeModel;

+ (ListInstance *)sharedInstance;

@end
54 changes: 54 additions & 0 deletions OptionSelector/ListInstance.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//
// ListInstance.m
// OptionSelector
//
// Created by Chris David on 8/13/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import "ListInstance.h"
#import "ListData.h"

@implementation ListInstance

+ (ListInstance *)sharedInstance
{
static dispatch_once_t once;
static id sharedInstance;
dispatch_once(&once, ^{
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}

-(void) initializeModel {

self.allCategories = [[NSMutableArray alloc] init];

ListData *basketball = [[ListData alloc] init];
basketball.name = @"Basketball";
basketball.selection = @"";
basketball.options = @[@"Knicks", @"Heat", @"Celtics", @"Warriors", @"Nets", @"Timberwolves"];
basketball.index = 0;
[self.allCategories addObject:basketball];

ListData * baseball = [[ListData alloc] init];
baseball.name = @"Baseball";
baseball.selection = @"";
baseball.options = @[@"Yankees", @"Mets", @"Red Sox", @"Twins", @"Dodgers"];
baseball.index = 1;
[self.allCategories addObject:baseball];

ListData * football = [[ListData alloc] init];
football.name = @"Football";
football.selection = @"";
football.options = @[@"Giants", @"Jets", @"Eagles", @"Colts", @"Patriots"];
football.index = 2;
[self.allCategories addObject:football];



}


@end
16 changes: 16 additions & 0 deletions OptionSelector/OptionsSelectTableViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// OptionsSelectTableViewController.h
// OptionSelector
//
// Created by Chris David on 8/11/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

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

@interface OptionsSelectTableViewController : UITableViewController

@property (nonatomic) ListData * category;

@end
Loading