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

Charles K. (Option Selector HW) #8

Open
wants to merge 10 commits 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
64 changes: 58 additions & 6 deletions OptionSelector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@
objects = {

/* Begin PBXBuildFile section */
4250F2C11B7AEB92009CBF9E /* Categories.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2C01B7AEB92009CBF9E /* Categories.m */; };
4250F2CD1B7AEC8B009CBF9E /* CategorySetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2CC1B7AEC8B009CBF9E /* CategorySetup.m */; };
4250F2D01B7AED11009CBF9E /* CategoryMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2CF1B7AED11009CBF9E /* CategoryMain.m */; };
4250F2D31B7AED4F009CBF9E /* CategoryTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2D21B7AED4F009CBF9E /* CategoryTableViewController.m */; };
4250F2D91B7AEE1D009CBF9E /* OptionSelectionTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2D81B7AEE1D009CBF9E /* OptionSelectionTableViewController.m */; };
4250F2E01B7AEF78009CBF9E /* Countries.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DB1B7AEF78009CBF9E /* Countries.m */; };
4250F2E11B7AEF78009CBF9E /* Countries.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DB1B7AEF78009CBF9E /* Countries.m */; };
4250F2E21B7AEF78009CBF9E /* Food.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DD1B7AEF78009CBF9E /* Food.m */; };
4250F2E31B7AEF78009CBF9E /* Food.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DD1B7AEF78009CBF9E /* Food.m */; };
4250F2E41B7AEF78009CBF9E /* Shoes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DF1B7AEF78009CBF9E /* Shoes.m */; };
4250F2E51B7AEF78009CBF9E /* Shoes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4250F2DF1B7AEF78009CBF9E /* Shoes.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 +37,28 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
424411B31B7BFCD80055A66A /* OptionSelectionTableViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionSelectionTableViewControllerDelegate.h; sourceTree = "<group>"; };
4250F2BF1B7AEB92009CBF9E /* Categories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Categories.h; sourceTree = "<group>"; };
4250F2C01B7AEB92009CBF9E /* Categories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Categories.m; sourceTree = "<group>"; };
4250F2CB1B7AEC8B009CBF9E /* CategorySetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategorySetup.h; sourceTree = "<group>"; };
4250F2CC1B7AEC8B009CBF9E /* CategorySetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategorySetup.m; sourceTree = "<group>"; };
4250F2CE1B7AED11009CBF9E /* CategoryMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategoryMain.h; sourceTree = "<group>"; };
4250F2CF1B7AED11009CBF9E /* CategoryMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategoryMain.m; sourceTree = "<group>"; };
4250F2D11B7AED4F009CBF9E /* CategoryTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategoryTableViewController.h; sourceTree = "<group>"; };
4250F2D21B7AED4F009CBF9E /* CategoryTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategoryTableViewController.m; sourceTree = "<group>"; };
4250F2D71B7AEE1D009CBF9E /* OptionSelectionTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionSelectionTableViewController.h; sourceTree = "<group>"; };
4250F2D81B7AEE1D009CBF9E /* OptionSelectionTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionSelectionTableViewController.m; sourceTree = "<group>"; };
4250F2DA1B7AEF78009CBF9E /* Countries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Countries.h; sourceTree = "<group>"; };
4250F2DB1B7AEF78009CBF9E /* Countries.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Countries.m; sourceTree = "<group>"; };
4250F2DC1B7AEF78009CBF9E /* Food.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Food.h; sourceTree = "<group>"; };
4250F2DD1B7AEF78009CBF9E /* Food.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Food.m; sourceTree = "<group>"; };
4250F2DE1B7AEF78009CBF9E /* Shoes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shoes.h; sourceTree = "<group>"; };
4250F2DF1B7AEF78009CBF9E /* Shoes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Shoes.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 +108,23 @@
children = (
8DECE7931B78082B0064D760 /* AppDelegate.h */,
8DECE7941B78082B0064D760 /* AppDelegate.m */,
8DECE7961B78082B0064D760 /* ViewController.h */,
8DECE7971B78082B0064D760 /* ViewController.m */,
4250F2BF1B7AEB92009CBF9E /* Categories.h */,
4250F2C01B7AEB92009CBF9E /* Categories.m */,
4250F2DA1B7AEF78009CBF9E /* Countries.h */,
4250F2DB1B7AEF78009CBF9E /* Countries.m */,
4250F2DC1B7AEF78009CBF9E /* Food.h */,
4250F2DD1B7AEF78009CBF9E /* Food.m */,
4250F2DE1B7AEF78009CBF9E /* Shoes.h */,
4250F2DF1B7AEF78009CBF9E /* Shoes.m */,
4250F2CB1B7AEC8B009CBF9E /* CategorySetup.h */,
4250F2CC1B7AEC8B009CBF9E /* CategorySetup.m */,
4250F2CE1B7AED11009CBF9E /* CategoryMain.h */,
4250F2CF1B7AED11009CBF9E /* CategoryMain.m */,
4250F2D11B7AED4F009CBF9E /* CategoryTableViewController.h */,
4250F2D21B7AED4F009CBF9E /* CategoryTableViewController.m */,
4250F2D71B7AEE1D009CBF9E /* OptionSelectionTableViewController.h */,
4250F2D81B7AEE1D009CBF9E /* OptionSelectionTableViewController.m */,
424411B31B7BFCD80055A66A /* OptionSelectionTableViewControllerDelegate.h */,
8DECE7991B78082B0064D760 /* Main.storyboard */,
8DECE79C1B78082B0064D760 /* Images.xcassets */,
8DECE79E1B78082B0064D760 /* LaunchScreen.xib */,
Expand Down Expand Up @@ -219,8 +259,15 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DECE7981B78082B0064D760 /* ViewController.m in Sources */,
4250F2E41B7AEF78009CBF9E /* Shoes.m in Sources */,
4250F2E21B7AEF78009CBF9E /* Food.m in Sources */,
8DECE7951B78082B0064D760 /* AppDelegate.m in Sources */,
4250F2D31B7AED4F009CBF9E /* CategoryTableViewController.m in Sources */,
4250F2E01B7AEF78009CBF9E /* Countries.m in Sources */,
4250F2D01B7AED11009CBF9E /* CategoryMain.m in Sources */,
4250F2CD1B7AEC8B009CBF9E /* CategorySetup.m in Sources */,
4250F2D91B7AEE1D009CBF9E /* OptionSelectionTableViewController.m in Sources */,
4250F2C11B7AEB92009CBF9E /* Categories.m in Sources */,
8DECE7921B78082B0064D760 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -229,6 +276,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4250F2E51B7AEF78009CBF9E /* Shoes.m in Sources */,
4250F2E31B7AEF78009CBF9E /* Food.m in Sources */,
4250F2E11B7AEF78009CBF9E /* Countries.m in Sources */,
8DECE7AC1B78082B0064D760 /* OptionSelectorTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -418,6 +468,7 @@
8DECE7B11B78082B0064D760 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DECE7B21B78082B0064D760 /* Build configuration list for PBXNativeTarget "OptionSelectorTests" */ = {
isa = XCConfigurationList;
Expand All @@ -426,6 +477,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="cej-h9-GJU">
<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">
<!--Navigation Controller-->
<scene sceneID="PKd-7R-xYX">
<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">
<navigationController id="cej-h9-GJU" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="6zd-SY-VDD">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="eRL-9i-623" kind="relationship" relationship="rootViewController" id="3Qf-4U-AId"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="flH-fF-5Tj" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="874" y="-136"/>
</scene>
<!--Categories-->
<scene sceneID="6CT-k5-oZM">
<objects>
<tableViewController title="Categories" id="eRL-9i-623" customClass="CategoryTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="UhW-Jc-0Gp">
<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="CategoryCellIdentifier" textLabel="qBb-vt-Ew5" detailTextLabel="x44-LT-tEp" style="IBUITableViewCellStyleValue1" id="YyX-qp-3eR">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YyX-qp-3eR" id="hjA-5G-gVP">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qBb-vt-Ew5">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<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="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="x44-LT-tEp">
<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="r6H-SQ-Jgw" kind="show" id="s0a-qO-fQv"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="eRL-9i-623" id="OJp-7W-Peq"/>
<outlet property="delegate" destination="eRL-9i-623" id="Ptd-xI-4NI"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="A2O-WV-ZXW"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="6CJ-Q3-Fgc" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1646" y="-136"/>
</scene>
<!--Option Selection Table View Controller-->
<scene sceneID="caH-I9-BqS">
<objects>
<tableViewController id="r6H-SQ-Jgw" customClass="OptionSelectionTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="nfv-4x-YxJ">
<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="cellChoiceIdentifier" id="rJO-XE-csA">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rJO-XE-csA" id="YcI-k1-3DJ">
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="r6H-SQ-Jgw" id="f73-LJ-sae"/>
<outlet property="delegate" destination="r6H-SQ-Jgw" id="wxP-Yy-MhG"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="v1g-rp-d5x" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2366" y="-136"/>
</scene>
</scenes>
</document>
17 changes: 17 additions & 0 deletions OptionSelector/Categories.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Categories.h
// OptionSelector
//
// Created by Charles Kang on 8/11/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Categories : NSObject

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes nearly always should have singular names. This is a single category, not a set of categories.

(Even classes that hold multiple things are generally singular; "Set", "List", "Deck", etc.)


@property (nonatomic) NSString *name;
@property (nonatomic) NSArray *choices;
@property (nonatomic) NSString *selection;

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

#import "Categories.h"

@implementation Categories

@end
Loading