Commit f775baa0 authored by Zach Knox's avatar Zach Knox
Browse files

I did the UISwitch right!

Also I updated license info on the headers
parent d73ebf28
......@@ -12,6 +12,7 @@
92182EC01E95BD2C00192ABA /* LocationsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92182EBF1E95BD2C00192ABA /* LocationsListViewController.swift */; };
92182EC41E95C38400192ABA /* LocationDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92182EC31E95C38400192ABA /* LocationDetailViewController.swift */; };
924840F81EA915F200DBFF4E /* SRCTSimpleCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 924840F71EA915F200DBFF4E /* SRCTSimpleCollectionViewCell.swift */; };
9270A4DB1EB5565400DFBDA3 /* SwitchingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9270A4DA1EB5565400DFBDA3 /* SwitchingTableViewCell.swift */; };
927C80DA1EB02566009079AD /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80D91EB02566009079AD /* SettingsTableViewController.swift */; };
927C80DC1EB18B89009079AD /* FiltersTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */; };
CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */; };
......@@ -58,6 +59,7 @@
92182EBF1E95BD2C00192ABA /* LocationsListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationsListViewController.swift; sourceTree = "<group>"; };
92182EC31E95C38400192ABA /* LocationDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationDetailViewController.swift; sourceTree = "<group>"; };
924840F71EA915F200DBFF4E /* SRCTSimpleCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SRCTSimpleCollectionViewCell.swift; sourceTree = "<group>"; };
9270A4DA1EB5565400DFBDA3 /* SwitchingTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchingTableViewCell.swift; sourceTree = "<group>"; };
927C80D91EB02566009079AD /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; };
927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FiltersTableViewController.swift; sourceTree = "<group>"; };
CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SRCTNetworkController.swift; sourceTree = "<group>"; };
......@@ -136,6 +138,7 @@
CD81F5301DC03AA700009FBD /* DataModel */,
CD81F51C1DC0334600009FBD /* AppDelegate.swift */,
927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */,
9270A4DA1EB5565400DFBDA3 /* SwitchingTableViewCell.swift */,
CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */,
CD763A7D1DE253B900ADFD6B /* SRCTUtilities.swift */,
CD763A7B1DE251C400ADFD6B /* SRCTSimpleTableViewCell.swift */,
......@@ -344,6 +347,7 @@
927C80DA1EB02566009079AD /* SettingsTableViewController.swift in Sources */,
CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */,
CD763A7C1DE251C400ADFD6B /* SRCTSimpleTableViewCell.swift in Sources */,
9270A4DB1EB5565400DFBDA3 /* SwitchingTableViewCell.swift in Sources */,
CD81F51D1DC0334600009FBD /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Patrick Murray on 25/10/2016.
// Copyright © 2016 Patrick Murray. All rights reserved.
// Copyright © 2016 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -97,7 +97,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="d2o-5D-WNk" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2991" y="-15"/>
<point key="canvasLocation" x="-7182" y="-2740"/>
</scene>
<!--Filters-->
<scene sceneID="92M-hL-B3A">
......@@ -108,48 +108,16 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ShowOpen" id="2Dt-e5-bMw">
<rect key="frame" x="0.0" y="55" width="375" height="44"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Switching" id="2Dt-e5-bMw" customClass="SwitchingTableViewCell" customModule="WhatsOpen" customModuleProvider="target">
<rect key="frame" x="0.0" y="56" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2Dt-e5-bMw" id="SM7-SZ-S5h">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KxM-rM-vzf">
<rect key="frame" x="318" y="8" width="51" height="31"/>
<connections>
<action selector="showOpenSwitch:forEvent:" destination="jkQ-vu-LQa" eventType="valueChanged" id="Rst-1e-uCb"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="KxM-rM-vzf" firstAttribute="trailing" secondItem="SM7-SZ-S5h" secondAttribute="trailingMargin" id="rbu-a9-rod"/>
<constraint firstItem="KxM-rM-vzf" firstAttribute="top" secondItem="SM7-SZ-S5h" secondAttribute="topMargin" id="t7L-Po-NU7"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ShowClosed" id="Zt7-lA-Klh">
<rect key="frame" x="0.0" y="99" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zt7-lA-Klh" id="1tH-zY-hLb">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="I0H-wK-NZE">
<rect key="frame" x="318" y="8" width="51" height="31"/>
<connections>
<action selector="showClosedSwitch:forEvent:" destination="jkQ-vu-LQa" eventType="valueChanged" id="0dP-rb-4bl"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="I0H-wK-NZE" firstAttribute="trailing" secondItem="1tH-zY-hLb" secondAttribute="trailingMargin" id="XaP-gO-2ac"/>
<constraint firstItem="I0H-wK-NZE" firstAttribute="top" secondItem="1tH-zY-hLb" secondAttribute="topMargin" id="vPD-AE-h4q"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="checkmark" indentationWidth="10" reuseIdentifier="Checkbox Filter" textLabel="rYu-5q-2u8" style="IBUITableViewCellStyleDefault" id="x5H-BH-cVX">
<rect key="frame" x="0.0" y="143" width="375" height="44"/>
<rect key="frame" x="0.0" y="100" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="x5H-BH-cVX" id="xf1-yc-ynP">
<rect key="frame" x="0.0" y="0.0" width="336" height="43.5"/>
......@@ -181,7 +149,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yyJ-38-T8j" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1572" y="2376.1619190404799"/>
<point key="canvasLocation" x="-8599" y="-349"/>
</scene>
<!--Locations List View Controller-->
<scene sceneID="w5e-Fb-rsR">
......@@ -291,7 +259,6 @@
<barButtonItem key="leftBarButtonItem" title="Filter" id="v4j-oA-7Fa">
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<action selector="LeftButton:" destination="aaB-Go-aWd" id="bIr-rA-LER"/>
<segue destination="pCI-LX-8uh" kind="popoverPresentation" popoverAnchorBarButtonItem="v4j-oA-7Fa" id="6D3-G7-Qyd">
<popoverArrowDirection key="popoverArrowDirection" up="YES" down="YES" left="YES" right="YES"/>
</segue>
......@@ -326,7 +293,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cQW-T4-yZv" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2020" y="840.62968515742136"/>
<point key="canvasLocation" x="-8151" y="-1884"/>
</scene>
<!--What's Open-->
<scene sceneID="rbo-Xh-B4S">
......@@ -338,10 +305,10 @@
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="uHy-SO-4Zr">
<rect key="frame" x="0.0" y="55" width="375" height="44"/>
<rect key="frame" x="0.0" y="56" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uHy-SO-4Zr" id="fwy-U7-SfD">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
......@@ -361,7 +328,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="86X-qD-8bb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2466" y="2377"/>
<point key="canvasLocation" x="-7706" y="-349"/>
</scene>
<!--Location Detail View Controller-->
<scene sceneID="O6o-IK-A4J">
......@@ -449,7 +416,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yn4-Px-X4z" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2991.1999999999998" y="840.62968515742136"/>
<point key="canvasLocation" x="-7180" y="-1884"/>
</scene>
<!--Root Navigation-->
<scene sceneID="WBs-Vx-0Yx">
......@@ -472,7 +439,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Sfq-EO-Nw1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1062" y="841"/>
<point key="canvasLocation" x="-9110" y="-1884"/>
</scene>
<!--Settings Navigation-->
<scene sceneID="4nY-5A-CmH">
......@@ -490,7 +457,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8kV-QI-qaH" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2466" y="1660"/>
<point key="canvasLocation" x="-7706" y="-1066"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="hwr-4e-Zz9">
......@@ -508,7 +475,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="2mB-A4-BEl" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2052" y="-15"/>
<point key="canvasLocation" x="-8119" y="-2740"/>
</scene>
<!--Filters Navigation-->
<scene sceneID="Qec-l3-QPJ">
......@@ -526,7 +493,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="220-gh-Iwe" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1572" y="1660"/>
<point key="canvasLocation" x="-8599" y="-1066"/>
</scene>
</scenes>
</document>
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Zach Knox on 4/26/17.
// Copyright © 2017 SRCT. All rights reserved.
// Copyright © 2017 SRCT. Some rights reserved.
//
import UIKit
......@@ -14,16 +14,12 @@ class FiltersTableViewController: UITableViewController {
self.dismiss(animated: true, completion: nil)
}
@IBAction func showOpenSwitch(_ sender: Any, forEvent event: UIEvent) {
print("tick1")
}
@IBAction func showClosedSwitch(_ sender: Any, forEvent event: UIEvent) {
print("tick2")
}
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
......@@ -35,7 +31,7 @@ class FiltersTableViewController: UITableViewController {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int {
......@@ -54,10 +50,10 @@ class FiltersTableViewController: UITableViewController {
case 0:
switch indexPath.row {
case 0:
cell = tableView.dequeueReusableCell(withIdentifier: "ShowOpen", for: indexPath)
cell = tableView.dequeueReusableCell(withIdentifier: "Switching", for: indexPath)
cell.textLabel!.text = "Show Open Locations"
case 1:
cell = tableView.dequeueReusableCell(withIdentifier: "ShowClosed", for: indexPath)
cell = tableView.dequeueReusableCell(withIdentifier: "Switching", for: indexPath)
cell.textLabel!.text = "Show Closed Locations"
default:
cell = UITableViewCell() //this is bad don't let this happen
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Zach Knox on 4/5/17.
// Copyright © 2017 Patrick Murray. All rights reserved.
// Copyright © 2017 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Zach Knox on 4/5/17.
// Copyright © 2017 Patrick Murray. All rights reserved.
// Copyright © 2017 SRCT. Some rights reserved.
//
import UIKit
......@@ -12,8 +12,6 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
var facilitiesArray = Array<Facility>()
@IBAction func LeftButton(_ sender: Any) {
}
@IBOutlet var LeftButton: UIBarButtonItem!
@IBAction func RightButton(_ sender: Any) {
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Patrick Murray on 25/10/2016.
// Copyright © 2016 Patrick Murray. All rights reserved.
// Copyright © 2016 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Zach Knox on 4/20/17.
// Copyright © 2017 Patrick Murray. All rights reserved.
// Copyright © 2017 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Patrick Murray on 20/11/2016.
// Copyright © 2016 Patrick Murray. All rights reserved.
// Copyright © 2016 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Patrick Murray on 20/11/2016.
// Copyright © 2016 Patrick Murray. All rights reserved.
// Copyright © 2016 SRCT. Some rights reserved.
//
import UIKit
......
......@@ -3,7 +3,7 @@
// WhatsOpen
//
// Created by Zach Knox on 4/25/17.
// Copyright © 2017 Patrick Murray. All rights reserved.
// Copyright © 2017 SRCT. Some rights reserved.
//
import UIKit
......
//
// SwitchingTableViewCell.swift
// WhatsOpen
//
// Created by Zach Knox on 4/29/17.
// Copyright © 2017 SRCT. All rights reserved.
//
import UIKit
class SwitchingTableViewCell: UITableViewCell {
let switchControl = UISwitch()
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
switchControl.addTarget(self, action: #selector(toggleSwitch), for: .valueChanged)
self.accessoryView = switchControl
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func toggleSwitch(_ sender: Any) {
print("toggle")
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment