Skip to content
Open

Done #14

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
31 changes: 25 additions & 6 deletions HeadsUpper/HeadsUpper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,30 @@
objects = {

/* Begin PBXBuildFile section */
6DF05E311C7A152200E67A7A /* CategorySelectionTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF05E301C7A152100E67A7A /* CategorySelectionTableViewController.m */; };
6DF05E341C7A15F000E67A7A /* GameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF05E331C7A15F000E67A7A /* GameViewController.m */; };
6DF05E3A1C7A192A00E67A7A /* GameCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF05E391C7A192A00E67A7A /* GameCategory.m */; };
6DF05E3D1C7A1AA500E67A7A /* CategoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF05E3C1C7A1AA500E67A7A /* CategoryModel.m */; };
8D89695C1C755D0200D32E8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695B1C755D0200D32E8A /* main.m */; };
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695E1C755D0200D32E8A /* AppDelegate.m */; };
8D8969621C755D0200D32E8A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D8969611C755D0200D32E8A /* ViewController.m */; };
8D8969651C755D0200D32E8A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969631C755D0200D32E8A /* Main.storyboard */; };
8D8969671C755D0200D32E8A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969661C755D0200D32E8A /* Assets.xcassets */; };
8D89696A1C755D0200D32E8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969681C755D0200D32E8A /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
6DF05E2F1C7A152100E67A7A /* CategorySelectionTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategorySelectionTableViewController.h; sourceTree = "<group>"; };
6DF05E301C7A152100E67A7A /* CategorySelectionTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategorySelectionTableViewController.m; sourceTree = "<group>"; };
6DF05E321C7A15F000E67A7A /* GameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameViewController.h; sourceTree = "<group>"; };
6DF05E331C7A15F000E67A7A /* GameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameViewController.m; sourceTree = "<group>"; };
6DF05E381C7A192A00E67A7A /* GameCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameCategory.h; sourceTree = "<group>"; };
6DF05E391C7A192A00E67A7A /* GameCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameCategory.m; sourceTree = "<group>"; };
6DF05E3B1C7A1AA500E67A7A /* CategoryModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategoryModel.h; sourceTree = "<group>"; };
6DF05E3C1C7A1AA500E67A7A /* CategoryModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategoryModel.m; sourceTree = "<group>"; };
8D8969571C755D0200D32E8A /* HeadsUpper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeadsUpper.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D89695B1C755D0200D32E8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8D89695D1C755D0200D32E8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8D89695E1C755D0200D32E8A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
8D8969601C755D0200D32E8A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
8D8969611C755D0200D32E8A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
8D8969641C755D0200D32E8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8D8969661C755D0200D32E8A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8D8969691C755D0200D32E8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -60,8 +69,14 @@
children = (
8D89695D1C755D0200D32E8A /* AppDelegate.h */,
8D89695E1C755D0200D32E8A /* AppDelegate.m */,
8D8969601C755D0200D32E8A /* ViewController.h */,
8D8969611C755D0200D32E8A /* ViewController.m */,
6DF05E381C7A192A00E67A7A /* GameCategory.h */,
6DF05E391C7A192A00E67A7A /* GameCategory.m */,
6DF05E3B1C7A1AA500E67A7A /* CategoryModel.h */,
6DF05E3C1C7A1AA500E67A7A /* CategoryModel.m */,
6DF05E2F1C7A152100E67A7A /* CategorySelectionTableViewController.h */,
6DF05E301C7A152100E67A7A /* CategorySelectionTableViewController.m */,
6DF05E321C7A15F000E67A7A /* GameViewController.h */,
6DF05E331C7A15F000E67A7A /* GameViewController.m */,
8D8969631C755D0200D32E8A /* Main.storyboard */,
8D8969661C755D0200D32E8A /* Assets.xcassets */,
8D8969681C755D0200D32E8A /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -149,9 +164,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D8969621C755D0200D32E8A /* ViewController.m in Sources */,
6DF05E341C7A15F000E67A7A /* GameViewController.m in Sources */,
6DF05E3D1C7A1AA500E67A7A /* CategoryModel.m in Sources */,
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */,
8D89695C1C755D0200D32E8A /* main.m in Sources */,
6DF05E3A1C7A192A00E67A7A /* GameCategory.m in Sources */,
6DF05E311C7A152200E67A7A /* CategorySelectionTableViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -300,6 +318,7 @@
8D8969701C755D0200D32E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
3 changes: 3 additions & 0 deletions HeadsUpper/HeadsUpper/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

return YES;
}

Expand Down
113 changes: 103 additions & 10 deletions HeadsUpper/HeadsUpper/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,118 @@
<?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="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="EnZ-1L-Qfg">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<!--Root View Controller-->
<scene sceneID="U23-ou-1BD">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<tableViewController id="Ps9-xB-j0U" customClass="CategorySelectionTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="icZ-GC-T5h">
<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" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="CellIdentifier" textLabel="CM5-Tt-aFc" style="IBUITableViewCellStyleDefault" id="u29-yy-qrl">
<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="u29-yy-qrl" id="SaP-Nx-dk6">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CM5-Tt-aFc">
<rect key="frame" x="15" y="0.0" width="550" height="43"/>
<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>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="31o-0b-nVG" kind="show" id="vMK-L3-lWe"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="Ps9-xB-j0U" id="gun-JA-tiq"/>
<outlet property="delegate" destination="Ps9-xB-j0U" id="0aA-ow-Pmc"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Root View Controller" id="eNO-yb-3w9"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yJC-o3-xl9" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1383" y="154"/>
</scene>
<!--Game View Controller-->
<scene sceneID="Fny-QW-2GR">
<objects>
<viewController id="31o-0b-nVG" customClass="GameViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
<viewControllerLayoutGuide type="top" id="VTo-6w-bHS"/>
<viewControllerLayoutGuide type="bottom" id="Lbj-sy-7vS"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<view key="view" contentMode="scaleToFill" id="Lk0-TY-Shz">
<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="custom" customColorSpace="calibratedWhite"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Question" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ORn-Nm-0Fo">
<rect key="frame" x="20" y="288" width="560" height="24"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" red="1" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Timer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5uE-zf-Eij">
<rect key="frame" x="536" y="72" width="44" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="5uE-zf-Eij" firstAttribute="top" secondItem="VTo-6w-bHS" secondAttribute="bottom" constant="8" id="5Iu-zU-F9R"/>
<constraint firstItem="ORn-Nm-0Fo" firstAttribute="centerY" secondItem="Lk0-TY-Shz" secondAttribute="centerY" id="9U6-Tr-33y"/>
<constraint firstAttribute="trailingMargin" secondItem="ORn-Nm-0Fo" secondAttribute="trailing" id="D2T-I9-lro"/>
<constraint firstItem="ORn-Nm-0Fo" firstAttribute="centerX" secondItem="Lk0-TY-Shz" secondAttribute="centerX" id="Dlc-lO-5xS"/>
<constraint firstAttribute="trailing" secondItem="5uE-zf-Eij" secondAttribute="trailing" constant="20" id="MdR-oJ-RZV"/>
<constraint firstItem="ORn-Nm-0Fo" firstAttribute="leading" secondItem="Lk0-TY-Shz" secondAttribute="leadingMargin" id="RwM-gH-vem"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="Dlc-lO-5xS"/>
</mask>
</variation>
</view>
<connections>
<outlet property="questionLabel" destination="ORn-Nm-0Fo" id="h0S-B7-tsy"/>
<outlet property="timerLabel" destination="5uE-zf-Eij" id="ovj-Jy-kx6"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rra-Gi-5IV" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2018" y="154"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="Rbf-LB-nr3">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="EnZ-1L-Qfg" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="bfN-Pf-8t5">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="Ps9-xB-j0U" kind="relationship" relationship="rootViewController" id="5Ka-pE-GOf"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vp6-Xp-wKV" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="571" y="154"/>
</scene>
</scenes>
</document>
19 changes: 19 additions & 0 deletions HeadsUpper/HeadsUpper/CategoryModel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// CategoryModel.h
// HeadsUpper
//
// Created by Xiulan Shi on 2/21/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CategoryModel : NSObject

@property (nonatomic) NSMutableArray *categories;

+ (instancetype)sharedInstance;

- (void)initializeModel;

@end
Loading