@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "shirt02.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "shirt03.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "shirt04.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "shirt05.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "shirts.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,24 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.23.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Yv4-Yq-tw3">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.16.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--CODER SWAG-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="CategoriesVC" customModule="Coder_Swag" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SHOP BY CATEGORY" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yjz-tm-Gq1">
<rect key="frame" x="16" y="20" width="160" height="22"/>
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="tG6-CJ-oSd">
<rect key="frame" x="0.0" y="57" width="375" height="546"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="CategoryCell" rowHeight="106" id="7kb-6S-A9d" customClass="CategoryCell" customModule="Coder_Swag" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="106"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="7kb-6S-A9d" id="ejD-3S-CGg">
<rect key="frame" x="0.0" y="0.0" width="375" height="105.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="digital" translatesAutoresizingMaskIntoConstraints="NO" id="zKi-ui-lyZ">
<rect key="frame" x="0.0" y="0.0" width="320" height="105.5"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DIGITAL" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nyC-Wt-BrI">
<rect key="frame" x="94" y="40.5" width="132" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="1jx-bc-0be"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="132" id="Kts-kd-Ff6"/>
</constraints>
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
<color key="textColor" red="0.92545570210000005" green="1" blue="0.96060849569999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="nyC-Wt-BrI" firstAttribute="centerY" secondItem="ejD-3S-CGg" secondAttribute="centerY" id="S3p-Ie-4JN"/>
<constraint firstItem="zKi-ui-lyZ" firstAttribute="leading" secondItem="ejD-3S-CGg" secondAttribute="leading" id="Te1-0F-rxA"/>
<constraint firstAttribute="bottom" secondItem="zKi-ui-lyZ" secondAttribute="bottom" id="Tyr-e6-9kv"/>
<constraint firstItem="zKi-ui-lyZ" firstAttribute="top" secondItem="ejD-3S-CGg" secondAttribute="top" id="XNV-Fn-oU3"/>
<constraint firstAttribute="trailing" secondItem="zKi-ui-lyZ" secondAttribute="trailing" id="cg0-7I-A5E"/>
<constraint firstItem="nyC-Wt-BrI" firstAttribute="centerX" secondItem="ejD-3S-CGg" secondAttribute="centerX" id="pkm-ch-YMo"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="categoryImage" destination="zKi-ui-lyZ" id="fZz-Lp-185"/>
<outlet property="categoryTitle" destination="nyC-Wt-BrI" id="F6A-2B-JG6"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="tG6-CJ-oSd" firstAttribute="bottom" secondItem="6Tk-OE-BBY" secondAttribute="bottom" id="0zE-O8-QZ2"/>
<constraint firstItem="tG6-CJ-oSd" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="6zf-hE-bXz"/>
<constraint firstItem="yjz-tm-Gq1" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="20" id="BdJ-sV-j29"/>
<constraint firstItem="yjz-tm-Gq1" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="IU0-Af-6s2"/>
<constraint firstItem="tG6-CJ-oSd" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="VyH-lh-jp9"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yjz-tm-Gq1" secondAttribute="trailing" symbolic="YES" id="alM-ts-6Yw"/>
<constraint firstItem="tG6-CJ-oSd" firstAttribute="top" secondItem="yjz-tm-Gq1" secondAttribute="bottom" constant="15" id="ipD-NP-TSN"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" title="CODER SWAG" id="BMy-dp-nrJ"/>
<connections>
<outlet property="categoryTable" destination="tG6-CJ-oSd" id="Yyl-hX-nLa"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="858.75" y="133.09859154929578"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="xFV-Nt-GCb">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Yv4-Yq-tw3" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="UPG-ps-P2D">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.66047345850000005" green="0.49315010100000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" red="0.92545570210000005" green="1" blue="0.96060849569999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</textAttributes>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="Mr6-qe-r4Y"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="mLx-4e-p00" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="10" y="134"/>
</scene>
</scenes>
<resources>
<image name="digital" width="1024" height="703"/>
</resources>
</document>
@@ -0,0 +1,37 @@
//
// ViewController.swift
// Coder-Swag
//
// Created by S M HEMEL on 7/11/18.
// Copyright © 2018 S M HEMEL. All rights reserved.
//
import UIKit

class CategoriesVC: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var categoryTable: UITableView!

override func viewDidLoad() {
super.viewDidLoad()
categoryTable.dataSource = self
categoryTable.delegate = self
}

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return DataService.instance.getCategories().count
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryCell") as? CategoryCell {
let categories = DataService.instance.getCategories()
let category = categories[indexPath.row]
cell.updateViews(category: category)
return cell
}
else {
return CategoryCell()
}
}

}

@@ -0,0 +1,18 @@
//
// Category.swift
// Coder-Swag
//
// Created by S M HEMEL on 7/11/18.
// Copyright © 2018 S M HEMEL. All rights reserved.
//
import Foundation

struct Category {
private(set) public var title: String
private(set) public var imageName: String
init(title: String, imageName: String){
self.title = title
self.imageName = imageName
}
}
@@ -0,0 +1,24 @@
//
// DataService.swift
// Coder-Swag
//
// Created by S M HEMEL on 7/11/18.
// Copyright © 2018 S M HEMEL. All rights reserved.
//
import Foundation

class DataService {
static let instance = DataService()

private let categories = [
Category(title: "SHIRT", imageName: "shirts.png"),
Category(title: "HOODIE", imageName: "hoodies.png"),
Category(title: "HAT", imageName: "hats.png"),
Category(title: "DIGITAL", imageName: "digital.png")
]

func getCategories() -> [Category] {
return categories
}
}
@@ -0,0 +1,21 @@
//
// CategoryCell.swift
// Coder-Swag
//
// Created by S M HEMEL on 7/11/18.
// Copyright © 2018 S M HEMEL. All rights reserved.
//
import UIKit

class CategoryCell: UITableViewCell {

@IBOutlet weak var categoryImage: UIImageView!
@IBOutlet weak var categoryTitle: UILabel!

func updateViews(category: Category) {
categoryImage.image = UIImage(named: category.imageName)
categoryTitle.text = category.title
}

}

This file was deleted.