Skip to content

Shout out to everyone who helped. #15

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

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
32 changes: 26 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 */
50CEAF061B7D6C6A008EDEC8 /* CQCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CEAF051B7D6C6A008EDEC8 /* CQCategory.m */; };
50CEAF091B7D6D8F008EDEC8 /* rootTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CEAF081B7D6D8F008EDEC8 /* rootTableViewController.m */; };
50CEAF0C1B7D6EC0008EDEC8 /* destinationTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CEAF0B1B7D6EC0008EDEC8 /* destinationTableViewController.m */; };
50CEAF0F1B7D75D6008EDEC8 /* CQCategoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CEAF0E1B7D75D6008EDEC8 /* CQCategoryModel.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,19 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
50CEAF041B7D6C6A008EDEC8 /* CQCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CQCategory.h; sourceTree = "<group>"; };
50CEAF051B7D6C6A008EDEC8 /* CQCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CQCategory.m; sourceTree = "<group>"; };
50CEAF071B7D6D8F008EDEC8 /* rootTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rootTableViewController.h; sourceTree = "<group>"; };
50CEAF081B7D6D8F008EDEC8 /* rootTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = rootTableViewController.m; sourceTree = "<group>"; };
50CEAF0A1B7D6EC0008EDEC8 /* destinationTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = destinationTableViewController.h; sourceTree = "<group>"; };
50CEAF0B1B7D6EC0008EDEC8 /* destinationTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = destinationTableViewController.m; sourceTree = "<group>"; };
50CEAF0D1B7D75D6008EDEC8 /* CQCategoryModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CQCategoryModel.h; sourceTree = "<group>"; };
50CEAF0E1B7D75D6008EDEC8 /* CQCategoryModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CQCategoryModel.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 @@ -83,8 +92,14 @@
children = (
8DECE7931B78082B0064D760 /* AppDelegate.h */,
8DECE7941B78082B0064D760 /* AppDelegate.m */,
8DECE7961B78082B0064D760 /* ViewController.h */,
8DECE7971B78082B0064D760 /* ViewController.m */,
50CEAF041B7D6C6A008EDEC8 /* CQCategory.h */,
50CEAF051B7D6C6A008EDEC8 /* CQCategory.m */,
50CEAF0D1B7D75D6008EDEC8 /* CQCategoryModel.h */,
50CEAF0E1B7D75D6008EDEC8 /* CQCategoryModel.m */,
50CEAF0A1B7D6EC0008EDEC8 /* destinationTableViewController.h */,
50CEAF0B1B7D6EC0008EDEC8 /* destinationTableViewController.m */,
50CEAF071B7D6D8F008EDEC8 /* rootTableViewController.h */,
50CEAF081B7D6D8F008EDEC8 /* rootTableViewController.m */,
8DECE7991B78082B0064D760 /* Main.storyboard */,
8DECE79C1B78082B0064D760 /* Images.xcassets */,
8DECE79E1B78082B0064D760 /* LaunchScreen.xib */,
Expand Down Expand Up @@ -219,9 +234,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DECE7981B78082B0064D760 /* ViewController.m in Sources */,
50CEAF061B7D6C6A008EDEC8 /* CQCategory.m in Sources */,
50CEAF0C1B7D6EC0008EDEC8 /* destinationTableViewController.m in Sources */,
8DECE7951B78082B0064D760 /* AppDelegate.m in Sources */,
8DECE7921B78082B0064D760 /* main.m in Sources */,
50CEAF091B7D6D8F008EDEC8 /* rootTableViewController.m in Sources */,
50CEAF0F1B7D75D6008EDEC8 /* CQCategoryModel.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -418,6 +436,7 @@
8DECE7B11B78082B0064D760 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DECE7B21B78082B0064D760 /* Build configuration list for PBXNativeTarget "OptionSelectorTests" */ = {
isa = XCConfigurationList;
Expand All @@ -426,6 +445,7 @@
8DECE7B41B78082B0064D760 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
85 changes: 70 additions & 15 deletions OptionSelector/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,80 @@
<?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="0IE-8g-ytD">
<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="NcD-qP-PB5">
<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="n2C-W5-bpn" customClass="rootTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="ABa-UI-J5L">
<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="Category" id="AUA-h4-vcO">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="AUA-h4-vcO" id="kvN-2f-1oc">
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
<connections>
<segue destination="07X-H9-mgT" kind="show" id="jdr-mr-1IG"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="n2C-W5-bpn" id="mLJ-6R-Eo5"/>
<outlet property="delegate" destination="n2C-W5-bpn" id="586-sI-qsU"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Root View Controller" id="eYj-b7-ygR"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="NeW-zn-zgu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="496" y="318"/>
</scene>
<!--Destination Table View Controller-->
<scene sceneID="F3f-QE-JJb">
<objects>
<tableViewController id="07X-H9-mgT" customClass="destinationTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="NV7-vQ-pIB">
<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="CategoryOptions" id="sH2-S9-j5v">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sH2-S9-j5v" id="4uh-zh-Q2H">
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="07X-H9-mgT" id="MJA-wI-8jm"/>
<outlet property="delegate" destination="07X-H9-mgT" id="bRT-SZ-Our"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="uDA-g5-3u0" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1300" y="318"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="KJt-CP-ucS">
<objects>
<navigationController id="0IE-8g-ytD" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="cue-mN-wQi">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="n2C-W5-bpn" kind="relationship" relationship="rootViewController" id="Yh1-Mp-rqY"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ljz-a5-CJK" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-324" y="318"/>
</scene>
</scenes>
</document>
19 changes: 19 additions & 0 deletions OptionSelector/CQCategory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// CQCategory.h
// OptionSelector
//
// Created by Jovanny Espinal on 8/13/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CQCategory : NSObject

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


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

#import "CQCategory.h"

@implementation CQCategory

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

#import <Foundation/Foundation.h>

@interface CQCategoryModel : NSObject

@property (nonatomic) NSMutableArray *categories;

-(void)initializeData;
+(id)sharedManager;


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

#import "CQCategoryModel.h"
#import "CQCategory.h"

@implementation CQCategoryModel

-(void)initializeData{

//Initialize category array
self.categories = [[NSMutableArray alloc] init];

//Initialize and create the first category
CQCategory *pullRoutine = [[CQCategory alloc] init];
pullRoutine.name = @"Pull";
pullRoutine.options = @[@"Deadlift", @"Barbell Rows", @"Pulldowns", @"Seated Cable Rows", @"Face Pulls", @"Hammer Curls", @"Dumbell Curls"];
pullRoutine.selection = @"";

//Add the second category
[self.categories addObject:pullRoutine];

//Initialize and create the second category
CQCategory *pushRoutine = [[CQCategory alloc] init];
pushRoutine.name = @"Push";
pushRoutine.options = @[@"Bench Press", @"Overhead Press", @"Incline Dumbell Press", @"Triceps Pushdowns", @"Lateral Raises", @"Overhead Triceps Extension"];
pushRoutine.selection = @"";

//Add the third category
[self.categories addObject:pushRoutine];

//Initialize and create the third category
CQCategory *legRoutine = [[CQCategory alloc] init];
legRoutine.name = @"Leg";
legRoutine.options = @[@"Back Squat", @"Romanian Deadlift", @"Leg Press", @"Leg Curl", @"Calf Raises"];
legRoutine.selection = @"";

//Add the third category
[self.categories addObject:legRoutine];



}
+(id)sharedManager{
static CQCategoryModel *sharedMyManager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedMyManager = [[self alloc] init];
});
return sharedMyManager;
}

@end
15 changes: 0 additions & 15 deletions OptionSelector/ViewController.h

This file was deleted.

27 changes: 0 additions & 27 deletions OptionSelector/ViewController.m

This file was deleted.

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

#import <UIKit/UIKit.h>
#import "CQCategory.h"
#import "CQCategoryModel.h"

@interface destinationTableViewController : UITableViewController

@property (nonatomic) CQCategory *categoryObject;



@end
Loading