Implemented and linked UI elements

This commit is contained in:
Dallon Archibald
2021-01-23 17:58:27 -05:00
parent e6817bd795
commit 74c2c76af9
2 changed files with 112 additions and 1 deletions
+103 -1
View File
@@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -277,14 +278,112 @@
<view key="view" contentMode="scaleToFill" id="wac-VZ-OTJ">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" spacing="34" translatesAutoresizingMaskIntoConstraints="NO" id="Lnz-vd-hkl">
<rect key="frame" x="41" y="131" width="332.5" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="54s-5X-INP">
<rect key="frame" x="0.0" y="0.0" width="58.5" height="60"/>
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="50"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=":" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W12-19-4Jh">
<rect key="frame" x="92.5" y="0.0" width="10.5" height="60"/>
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="50"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rpt-j6-UiB">
<rect key="frame" x="137" y="0.0" width="58.5" height="60"/>
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="50"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=":" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rGI-kH-dgk">
<rect key="frame" x="229.5" y="0.0" width="10.5" height="60"/>
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="50"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SdB-cz-eTv">
<rect key="frame" x="274" y="0.0" width="58.5" height="60"/>
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="50"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="fillProportionally" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4j4-zF-LWF">
<rect key="frame" x="41" y="241" width="332" height="150"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jse-AL-cOs">
<rect key="frame" x="0.0" y="0.0" width="332" height="30"/>
<color key="backgroundColor" name="AccentColor"/>
<state key="normal" title="Start">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O4A-eq-kEz">
<rect key="frame" x="0.0" y="40" width="332" height="30"/>
<color key="backgroundColor" name="AccentColor"/>
<state key="normal" title="Stop">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Q7i-3U-NbI">
<rect key="frame" x="0.0" y="80" width="332" height="30"/>
<color key="backgroundColor" name="AccentColor"/>
<state key="normal" title="Reset">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="794-VN-m96">
<rect key="frame" x="0.0" y="120" width="332" height="30"/>
<color key="backgroundColor" name="AccentColor"/>
<state key="normal" title="Lap">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
</subviews>
</stackView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="O7B-Tj-vT0">
<rect key="frame" x="20" y="423" width="374" height="367"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="lapCell" id="2Je-Lw-ZAb">
<rect key="frame" x="0.0" y="28" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2Je-Lw-ZAb" id="HNi-3j-MIV">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="0Lp-Fy-R0s"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="4j4-zF-LWF" firstAttribute="leading" secondItem="0Lp-Fy-R0s" secondAttribute="leading" constant="41" id="7P4-QZ-BE3"/>
<constraint firstItem="0Lp-Fy-R0s" firstAttribute="trailing" secondItem="4j4-zF-LWF" secondAttribute="trailing" constant="41" id="Mh6-3c-CXO"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Stopwatch" image="clock.arrow.circlepath" catalog="system" selectedImage="clock.arrow.circlepath" id="hNc-UI-vIQ"/>
<connections>
<outlet property="hourLabel" destination="54s-5X-INP" id="Ugg-ul-ebm"/>
<outlet property="lapButton" destination="794-VN-m96" id="1aX-pS-Cjr"/>
<outlet property="minuteLabel" destination="rpt-j6-UiB" id="Qaf-xg-UCX"/>
<outlet property="resetButton" destination="Q7i-3U-NbI" id="gYT-DB-XpP"/>
<outlet property="secondLabel" destination="SdB-cz-eTv" id="syA-P8-NFX"/>
<outlet property="startButton" destination="Jse-AL-cOs" id="iq2-xE-Nir"/>
<outlet property="stopButton" destination="O4A-eq-kEz" id="dd7-v0-fqc"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZlX-5W-Pjn" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="194" y="869"/>
<point key="canvasLocation" x="192.75362318840581" y="868.52678571428567"/>
</scene>
<!--Add Alarm View Controller-->
<scene sceneID="sJi-AZ-FUw">
@@ -837,6 +936,9 @@
<image name="person.crop.circle" catalog="system" width="128" height="121"/>
<image name="person.crop.circle.badge.checkmark" catalog="system" width="128" height="113"/>
<image name="trash.fill" catalog="system" width="121" height="128"/>
<namedColor name="AccentColor">
<color red="0.0" green="0.46000000000000002" blue="0.89000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
@@ -9,6 +9,15 @@ import UIKit
class StopwatchViewController: UIViewController {
@IBOutlet weak var hourLabel: UILabel!
@IBOutlet weak var minuteLabel: UILabel!
@IBOutlet weak var secondLabel: UILabel!
@IBOutlet weak var startButton: UIButton!
@IBOutlet weak var stopButton: UIButton!
@IBOutlet weak var resetButton: UIButton!
@IBOutlet weak var lapButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()