Skip to content

Commit

Permalink
completed solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Bement authored and Steve Bement committed Aug 30, 2016
1 parent 8195577 commit 4bf5c72
Show file tree
Hide file tree
Showing 34 changed files with 1,459 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
530 changes: 530 additions & 0 deletions FizzBuzz.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions FizzBuzz/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// AppDelegate.swift
// FizzBuzz
//
// Created by Steve Bement on 7/7/16.
// Copyright © 2016 Steve Bement. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

73 changes: 73 additions & 0 deletions FizzBuzz/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions FizzBuzz/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
21 changes: 21 additions & 0 deletions FizzBuzz/Assets.xcassets/button_border.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "button_border.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions FizzBuzz/Assets.xcassets/champagne.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "champagne80.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "champagne100.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "champagne200.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions FizzBuzz/Assets.xcassets/lightning.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "lightning80.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "lightning100.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "lightning200.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions FizzBuzz/Assets.xcassets/space.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "space80.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "space100.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "space200.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions FizzBuzz/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
126 changes: 126 additions & 0 deletions FizzBuzz/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11103.10"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController storyboardIdentifier="ViewController" id="BYZ-38-t0r" customClass="ViewController" customModule="FizzBuzz" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V3f-iC-CRu">
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
<state key="normal" title="Play Again">
<color key="titleColor" red="0.23921568627450979" green="0.51764705882352935" blue="0.6588235294117647" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dFs-ag-7Ke">
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
<state key="normal" title="3 / 5">
<color key="titleColor" red="0.23921568630000001" green="0.51764705879999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dAN-1q-lcR" userLabel="GameView">
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aEE-26-0Pe">
<accessibility key="accessibilityConfiguration" identifier="numberButton"/>
<fontDescription key="fontDescription" name="Avenir-Light" family="Avenir" pointSize="70"/>
<state key="normal" title="0" backgroundImage="button_border">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="buttonTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="QyV-Z7-pwI"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ir5-rT-2OJ">
<accessibility key="accessibilityConfiguration" identifier="buzzButton"/>
<state key="normal" image="lightning" backgroundImage="button_border">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="buttonTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="nIa-Hk-xF5"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QAh-ju-DI8">
<accessibility key="accessibilityConfiguration" identifier="fizzBuzzButton"/>
<state key="normal" image="space" backgroundImage="button_border">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="buttonTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="KcY-gw-hrD"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xkB-Ox-SR2">
<accessibility key="accessibilityConfiguration" identifier="fizzButton"/>
<state key="normal" image="champagne" backgroundImage="button_border">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="buttonTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="JZO-FQ-ecU"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="aEE-26-0Pe" firstAttribute="leading" secondItem="dAN-1q-lcR" secondAttribute="leading" id="4kU-wm-Aua"/>
<constraint firstAttribute="trailing" secondItem="QAh-ju-DI8" secondAttribute="trailing" id="9aQ-Qi-tAd"/>
<constraint firstItem="xkB-Ox-SR2" firstAttribute="height" secondItem="aEE-26-0Pe" secondAttribute="height" id="B45-nZ-WAl"/>
<constraint firstItem="QAh-ju-DI8" firstAttribute="width" secondItem="aEE-26-0Pe" secondAttribute="width" id="BDM-MQ-c5Y"/>
<constraint firstItem="ir5-rT-2OJ" firstAttribute="height" secondItem="aEE-26-0Pe" secondAttribute="height" id="CkF-ur-jK5"/>
<constraint firstItem="aEE-26-0Pe" firstAttribute="top" secondItem="dAN-1q-lcR" secondAttribute="top" id="FJG-cx-hyi"/>
<constraint firstItem="ir5-rT-2OJ" firstAttribute="leading" secondItem="dAN-1q-lcR" secondAttribute="leading" id="G1u-6P-WLM"/>
<constraint firstItem="xkB-Ox-SR2" firstAttribute="width" secondItem="aEE-26-0Pe" secondAttribute="width" id="If1-uK-iKO"/>
<constraint firstItem="aEE-26-0Pe" firstAttribute="height" secondItem="dAN-1q-lcR" secondAttribute="height" multiplier="0.48" id="d42-ck-Qjg"/>
<constraint firstItem="aEE-26-0Pe" firstAttribute="width" secondItem="dAN-1q-lcR" secondAttribute="width" multiplier="0.48" id="dOk-Cd-7Tr"/>
<constraint firstAttribute="bottom" secondItem="QAh-ju-DI8" secondAttribute="bottom" id="eTV-QE-eSJ"/>
<constraint firstItem="ir5-rT-2OJ" firstAttribute="width" secondItem="aEE-26-0Pe" secondAttribute="width" id="ggU-xd-e9y"/>
<constraint firstAttribute="bottom" secondItem="ir5-rT-2OJ" secondAttribute="bottom" id="hVC-ID-RQB"/>
<constraint firstItem="xkB-Ox-SR2" firstAttribute="top" secondItem="dAN-1q-lcR" secondAttribute="top" id="moY-2a-yFf"/>
<constraint firstItem="QAh-ju-DI8" firstAttribute="height" secondItem="aEE-26-0Pe" secondAttribute="height" id="qfc-4U-VBd"/>
<constraint firstAttribute="width" secondItem="dAN-1q-lcR" secondAttribute="height" multiplier="1:1" id="t5R-dV-VHa"/>
<constraint firstAttribute="trailing" secondItem="xkB-Ox-SR2" secondAttribute="trailing" id="vLa-F0-8Fo"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.28235294117647058" green="0.27450980392156865" blue="0.42745098039215684" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="dAN-1q-lcR" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="1SX-IL-YRg"/>
<constraint firstAttribute="trailingMargin" secondItem="dFs-ag-7Ke" secondAttribute="trailing" id="JFt-0K-aiM"/>
<constraint firstAttribute="trailingMargin" secondItem="V3f-iC-CRu" secondAttribute="trailing" id="V9V-98-rJa"/>
<constraint firstItem="dAN-1q-lcR" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="40" id="WAI-Qe-mTS"/>
<constraint firstItem="dFs-ag-7Ke" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="XxB-eX-pgl"/>
<constraint firstItem="dAN-1q-lcR" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="jba-Do-DQt"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="V3f-iC-CRu" secondAttribute="bottom" constant="20" id="yIT-Sr-ED5"/>
</constraints>
</view>
<connections>
<outlet property="buzzButton" destination="ir5-rT-2OJ" id="jMa-QM-JQX"/>
<outlet property="fizzButton" destination="xkB-Ox-SR2" id="KX1-1Y-aYe"/>
<outlet property="fizzBuzzButton" destination="QAh-ju-DI8" id="8co-x9-fVz"/>
<outlet property="numberButton" destination="aEE-26-0Pe" id="2oF-VP-1z8"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="213.59999999999999" y="243.32833583208398"/>
</scene>
</scenes>
<resources>
<image name="button_border" width="400" height="400"/>
<image name="champagne" width="80" height="82"/>
<image name="lightning" width="47" height="80"/>
<image name="space" width="75" height="80"/>
</resources>
</document>
Loading

0 comments on commit 4bf5c72

Please sign in to comment.