Commit b337c3a7 authored by tybrandt's avatar tybrandt
Browse files

Delete All View now displays

parent 11eb6062
......@@ -21,6 +21,7 @@
DEC2567C25E887450003EFC9 /* Budget_TrackerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC2567B25E887450003EFC9 /* Budget_TrackerUITests.swift */; };
DEC2569B25E89A400003EFC9 /* AddTransactionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC2569A25E89A400003EFC9 /* AddTransactionViewController.swift */; };
DEEC3BC725FB1EFA00011733 /* CategoryTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEEC3BC625FB1EFA00011733 /* CategoryTableViewCell.swift */; };
DEFCC41726169EAA00F90B8B /* DeletionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEFCC41626169EAA00F90B8B /* DeletionViewController.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -61,6 +62,7 @@
DEC2567D25E887450003EFC9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DEC2569A25E89A400003EFC9 /* AddTransactionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddTransactionViewController.swift; sourceTree = "<group>"; };
DEEC3BC625FB1EFA00011733 /* CategoryTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryTableViewCell.swift; sourceTree = "<group>"; };
DEFCC41626169EAA00F90B8B /* DeletionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletionViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -120,6 +122,7 @@
DE053E9F2604789B0015C753 /* TransactionTableViewCell.swift */,
DE053EA4260478B70015C753 /* Transaction.swift */,
DEC2569A25E89A400003EFC9 /* AddTransactionViewController.swift */,
DEFCC41626169EAA00F90B8B /* DeletionViewController.swift */,
DEC2565F25E887410003EFC9 /* Main.storyboard */,
DEC2566225E887440003EFC9 /* Assets.xcassets */,
DEC2566425E887440003EFC9 /* LaunchScreen.storyboard */,
......@@ -282,6 +285,7 @@
DE053E98260477660015C753 /* TransactionTableViewController.swift in Sources */,
DEC2565A25E887410003EFC9 /* AppDelegate.swift in Sources */,
DEC2565C25E887410003EFC9 /* SceneDelegate.swift in Sources */,
DEFCC41726169EAA00F90B8B /* DeletionViewController.swift in Sources */,
DEC2569B25E89A400003EFC9 /* AddTransactionViewController.swift in Sources */,
DEEC3BC725FB1EFA00011733 /* CategoryTableViewCell.swift in Sources */,
DE053EA5260478B70015C753 /* Transaction.swift in Sources */,
......
......@@ -38,7 +38,7 @@
<color key="titleColor" systemColor="systemIndigoColor"/>
</state>
<connections>
<segue destination="fMk-k4-n9V" kind="show" id="vPX-cl-Jc3"/>
<action selector="viewTransactions:" destination="BYZ-38-t0r" eventType="touchUpInside" id="HRx-ty-iuD"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total: $0.00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bay-ph-RNu">
......@@ -99,6 +99,9 @@
<state key="normal" title="CLEAR DATA">
<color key="titleColor" systemColor="systemRedColor"/>
</state>
<connections>
<action selector="confirmDelete:" destination="BYZ-38-t0r" eventType="touchUpInside" id="mrV-ZW-wIH"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
......@@ -126,11 +129,13 @@
<outlet property="categoryTable" destination="2vd-QX-gXm" id="RVa-T8-OWz"/>
<outlet property="totalLabel" destination="bay-ph-RNu" id="2af-D9-cpa"/>
<segue destination="JIR-F4-P6s" kind="presentation" identifier="addTransaction" id="4xG-2T-kn9"/>
<segue destination="fMk-k4-n9V" kind="show" identifier="showTransactions" id="fjM-Ke-YRf"/>
<segue destination="S1V-KR-a3v" kind="presentation" identifier="showDelete" id="Pg9-7d-59Z"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="950.72463768115949" y="164.73214285714286"/>
<point key="canvasLocation" x="923" y="165"/>
</scene>
<!--All Transactions-->
<scene sceneID="9Bx-fx-jyj">
......@@ -142,14 +147,14 @@
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="allTransactions" id="e68-D8-BFK" customClass="TransactionTableViewCell" customModule="Budget_Tracker" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="28" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="e68-D8-BFK" id="Q12-f8-IYE">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZQh-dN-pAc">
<rect key="frame" x="20" y="11" width="42" height="21"/>
<rect key="frame" x="20" y="11" width="42" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
......@@ -182,7 +187,47 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Vnp-er-RtW" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2812" y="530"/>
<point key="canvasLocation" x="2812" y="165"/>
</scene>
<!--Delete All Confirmation-->
<scene sceneID="a5z-6h-cFL">
<objects>
<viewController id="2i0-KG-j1T" customClass="DeletionViewController" customModule="Budget_Tracker" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="SBD-pd-l3O">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WARNING: This will delete all transactions. Proceed?" lineBreakMode="tailTruncation" numberOfLines="10" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H6G-mT-H8f">
<rect key="frame" x="20" y="76" width="374" height="57.5"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="wj6-tN-4pg"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="H6G-mT-H8f" firstAttribute="top" secondItem="wj6-tN-4pg" secondAttribute="top" constant="20" id="39c-Ar-HQM"/>
<constraint firstItem="H6G-mT-H8f" firstAttribute="leading" secondItem="wj6-tN-4pg" secondAttribute="leading" constant="20" id="3mB-Y0-gJH"/>
<constraint firstItem="wj6-tN-4pg" firstAttribute="trailing" secondItem="H6G-mT-H8f" secondAttribute="trailing" constant="20" id="Mao-Cr-6Bw"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Delete All Confirmation" id="sva-iT-2r1">
<barButtonItem key="leftBarButtonItem" systemItem="cancel" id="68X-b9-1aw">
<connections>
<action selector="cancel:" destination="2i0-KG-j1T" id="d1V-u5-tXa"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" title="Confirm" id="foO-CN-S4s">
<connections>
<action selector="confirm:" destination="2i0-KG-j1T" id="Ubw-cj-tI6"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qmn-NT-Tu8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2811.594202898551" y="906.69642857142856"/>
</scene>
<!--Add Transaction-->
<scene sceneID="jMr-WU-dY7">
......@@ -245,7 +290,7 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="jOc-cA-MFX" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="ZYl-Ei-Xw9" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="2812" y="-194"/>
<point key="canvasLocation" x="2812" y="-575"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="h9C-C0-k84">
......@@ -282,7 +327,7 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="HJa-Mg-ThC" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1848" y="-194"/>
<point key="canvasLocation" x="1848" y="-575"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="FS8-hY-hF7">
......@@ -301,7 +346,25 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pSl-yP-Ti1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1848" y="530"/>
<point key="canvasLocation" x="1848" y="165"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="sGw-qv-EVz">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="S1V-KR-a3v" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="ECZ-bt-BA7">
<rect key="frame" x="0.0" y="0.0" width="414" height="56"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="2i0-KG-j1T" kind="relationship" relationship="rootViewController" id="M5A-jm-7U6"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="g2y-ep-vTd" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1848" y="907"/>
</scene>
</scenes>
<resources>
......
......@@ -30,6 +30,14 @@ class CategoryViewController: UIViewController, UITableViewDelegate, UITableView
performSegue(withIdentifier: "addTransaction", sender: self)
}
@IBAction func viewTransactions(_ sender: UIButton) {
performSegue(withIdentifier: "showTransactions", sender: self)
}
@IBAction func confirmDelete(_ sender: UIButton) {
performSegue(withIdentifier: "showDelete", sender: self)
}
@IBAction func displayData(sender: UIStoryboardSegue) {
if let sourceView = sender.source as? AddTransactionViewController {
categories = sourceView.categories
......
//
// DeletionViewController.swift
// Budget Tracker
//
// Created by Tyler Brandt on 4/1/21.
//
import UIKit
class DeletionViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func confirm(_ sender: UIBarButtonItem) {
dismiss(animated: true, completion: nil)
}
@IBAction func cancel(_ sender: UIBarButtonItem) {
dismiss(animated: true, completion: nil)
}
}
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