Skip to content

Instantly share code, notes, and snippets.

@DonMag
Created January 10, 2021 15:05
Show Gist options
  • Save DonMag/1ddc83e04584756ad750855b16a14ba1 to your computer and use it in GitHub Desktop.
Save DonMag/1ddc83e04584756ad750855b16a14ba1 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="mnm-iy-9SH">
<device id="retina4_7" orientation="landscape" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Stack Trait View Controller-->
<scene sceneID="mwT-rX-KJa">
<objects>
<viewController id="mnm-iy-9SH" customClass="StackTraitViewController" customModule="PanZoom" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ab3-Fq-Rk7">
<rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="France, Alps D'Huez" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wqx-uK-R1P">
<rect key="frame" x="0.0" y="4" width="667" height="20.5"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="e9V-0U-UUn" userLabel="HorizontalStack">
<rect key="frame" x="4" y="28.5" width="659" height="70.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="Pod-Fb-H4T" userLabel="RedPairStack">
<rect key="frame" x="0.0" y="0.0" width="214.5" height="70.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="YKb-cD-7MY" userLabel="NameValueRedA">
<rect key="frame" x="0.0" y="0.0" width="103" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="POWER" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vju-Il-6aV">
<rect key="frame" x="0.0" y="0.0" width="103" height="14.5"/>
<color key="backgroundColor" red="0.68733056940558379" green="0.025132815896797864" blue="0.052288087482289997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="98" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iyw-jV-dGo">
<rect key="frame" x="0.0" y="15.5" width="103" height="55"/>
<color key="backgroundColor" red="0.68733056940558379" green="0.025132815896797864" blue="0.052288087482289997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="mQq-SO-7SE" userLabel="NameValueRedB">
<rect key="frame" x="111" y="0.0" width="103.5" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SLOPE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VSN-Tl-5Hz">
<rect key="frame" x="0.0" y="0.0" width="103.5" height="14.5"/>
<color key="backgroundColor" red="0.89402473184213194" green="0.032690760447340934" blue="0.0680121697923603" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-2.9" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mtU-fc-QLV">
<rect key="frame" x="0.0" y="15.5" width="103.5" height="55"/>
<color key="backgroundColor" red="0.89402473184213194" green="0.032690760447340934" blue="0.0680121697923603" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<variation key="heightClass=compact" axis="horizontal"/>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="7Bm-yE-zIB" userLabel="GreenPairStack">
<rect key="frame" x="222.5" y="0.0" width="214" height="70.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="bab-hr-YW2" userLabel="NameValueGreenA">
<rect key="frame" x="0.0" y="0.0" width="103" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DISTANCE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JNY-R6-TId">
<rect key="frame" x="0.0" y="0.0" width="103" height="14.5"/>
<color key="backgroundColor" red="0.032012654247659728" green="0.60733264593908631" blue="0.054236296867583376" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.31" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dBz-C6-Gmp">
<rect key="frame" x="0.0" y="15.5" width="103" height="55"/>
<color key="backgroundColor" red="0.032012654247659728" green="0.60733264593908631" blue="0.054236296867583376" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="G1B-FS-oDA" userLabel="NameValueGreenB">
<rect key="frame" x="111" y="0.0" width="103" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ELAPSED TIME" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VwS-Wc-s6a">
<rect key="frame" x="0.0" y="0.0" width="103" height="14.5"/>
<color key="backgroundColor" red="0.042634764180042951" green="0.80885152284263961" blue="0.072232427497550072" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="02:03" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z0s-JK-2It">
<rect key="frame" x="0.0" y="15.5" width="103" height="55"/>
<color key="backgroundColor" red="0.042634764180042951" green="0.80885152284263961" blue="0.072232427497550072" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<variation key="heightClass=compact" axis="horizontal"/>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="e6c-NJ-JmG" userLabel="BluePairStack">
<rect key="frame" x="444.5" y="0.0" width="214.5" height="70.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="8g2-5z-6p4" userLabel="NameValueBlueA">
<rect key="frame" x="0.0" y="0.0" width="103.5" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HEART RATE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tCd-TQ-IyV">
<rect key="frame" x="0.0" y="0.0" width="103.5" height="14.5"/>
<color key="backgroundColor" red="0.1425765790459467" green="0.441648328116096" blue="0.76565385620761428" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="140" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vNg-VU-u9w">
<rect key="frame" x="0.0" y="15.5" width="103.5" height="55"/>
<color key="backgroundColor" red="0.1425765790459467" green="0.441648328116096" blue="0.76565385620761428" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="unc-4f-H9k" userLabel="NameValueBlueB">
<rect key="frame" x="111.5" y="0.0" width="103" height="70.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CADENCE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sfO-62-HW6">
<rect key="frame" x="0.0" y="0.0" width="103" height="14.5"/>
<color key="backgroundColor" red="0.17481867391474118" green="0.54152214602538096" blue="0.93879789174060913" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="79" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zxW-ki-C9S">
<rect key="frame" x="0.0" y="15.5" width="103" height="55"/>
<color key="backgroundColor" red="0.17481867391474118" green="0.54152214602538096" blue="0.93879789174060913" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-Bold" family="Avenir Next Condensed" pointSize="40"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<variation key="heightClass=compact" axis="horizontal"/>
</stackView>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Map View" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oBs-Bc-V97">
<rect key="frame" x="4" y="103" width="327.5" height="224"/>
<color key="backgroundColor" red="0.99953407049999998" green="0.98835557699999999" blue="0.47265523669999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<color key="textColor" red="0.1748186739" green="0.54152214600000004" blue="0.93879789170000005" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R3S-Kf-IQb" customClass="HeartRateView" customModule="PanZoom" customModuleProvider="target">
<rect key="frame" x="335.5" y="103" width="327.5" height="224"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="vno-pn-WC3" userLabel="ButtonsStack">
<rect key="frame" x="8" y="331" width="651" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tg0-mU-vfV">
<rect key="frame" x="0.0" y="0.0" width="126" height="40"/>
<color key="backgroundColor" red="0.19602152710000001" green="0.1960558593" blue="0.20991301540000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pause" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Szg-Qi-iZ2">
<rect key="frame" x="130" y="0.0" width="391" height="40"/>
<color key="backgroundColor" red="0.56858366729999998" green="0.56866830589999995" blue="0.56856513019999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RjG-oG-clB">
<rect key="frame" x="525" y="0.0" width="126" height="40"/>
<color key="backgroundColor" red="0.19602152710000001" green="0.1960558593" blue="0.20991301540000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Szg-Qi-iZ2" firstAttribute="width" secondItem="vno-pn-WC3" secondAttribute="width" multiplier="0.6" id="L7y-R7-07H"/>
<constraint firstItem="RjG-oG-clB" firstAttribute="width" secondItem="Tg0-mU-vfV" secondAttribute="width" id="k9f-Sh-e3y"/>
<constraint firstAttribute="height" constant="40" id="lKL-Sy-gWN"/>
</constraints>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="eRu-pz-jIm"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="eRu-pz-jIm" firstAttribute="trailing" secondItem="vno-pn-WC3" secondAttribute="trailing" constant="8" id="2M0-OW-saK"/>
<constraint firstItem="R3S-Kf-IQb" firstAttribute="top" secondItem="oBs-Bc-V97" secondAttribute="top" id="36R-HT-1GL"/>
<constraint firstItem="e9V-0U-UUn" firstAttribute="top" secondItem="wqx-uK-R1P" secondAttribute="bottom" constant="4" id="3Lh-xc-jlX"/>
<constraint firstItem="R3S-Kf-IQb" firstAttribute="height" secondItem="oBs-Bc-V97" secondAttribute="height" id="4K0-h4-n7b"/>
<constraint firstItem="eRu-pz-jIm" firstAttribute="bottom" secondItem="vno-pn-WC3" secondAttribute="bottom" constant="4" id="5sG-2K-r3g"/>
<constraint firstItem="R3S-Kf-IQb" firstAttribute="leading" secondItem="oBs-Bc-V97" secondAttribute="trailing" priority="750" constant="4" id="87u-BX-UjI"/>
<constraint firstItem="oBs-Bc-V97" firstAttribute="leading" secondItem="eRu-pz-jIm" secondAttribute="leading" constant="4" id="8ll-W3-qdl"/>
<constraint firstItem="R3S-Kf-IQb" firstAttribute="leading" secondItem="eRu-pz-jIm" secondAttribute="leading" priority="250" constant="4" id="AN1-74-QVu"/>
<constraint firstItem="wqx-uK-R1P" firstAttribute="leading" secondItem="eRu-pz-jIm" secondAttribute="leading" id="ARQ-TI-e8r"/>
<constraint firstItem="R3S-Kf-IQb" firstAttribute="width" secondItem="oBs-Bc-V97" secondAttribute="width" id="C2j-ts-aDI"/>
<constraint firstItem="eRu-pz-jIm" firstAttribute="trailing" secondItem="R3S-Kf-IQb" secondAttribute="trailing" constant="4" id="SfQ-eB-zsi"/>
<constraint firstItem="vno-pn-WC3" firstAttribute="top" secondItem="oBs-Bc-V97" secondAttribute="bottom" constant="4" id="XHL-ZC-DxT"/>
<constraint firstItem="wqx-uK-R1P" firstAttribute="trailing" secondItem="eRu-pz-jIm" secondAttribute="trailing" id="rJ5-Nv-Bhe"/>
<constraint firstItem="eRu-pz-jIm" firstAttribute="trailing" secondItem="oBs-Bc-V97" secondAttribute="trailing" constant="4" id="s4J-Rs-rGc"/>
<constraint firstItem="vno-pn-WC3" firstAttribute="leading" secondItem="eRu-pz-jIm" secondAttribute="leading" constant="8" id="sKu-WC-cn0"/>
<constraint firstItem="eRu-pz-jIm" firstAttribute="trailing" secondItem="e9V-0U-UUn" secondAttribute="trailing" constant="4" id="see-ES-qJE"/>
<constraint firstItem="oBs-Bc-V97" firstAttribute="top" secondItem="e9V-0U-UUn" secondAttribute="bottom" constant="4" id="vaK-yl-Rhd"/>
<constraint firstItem="wqx-uK-R1P" firstAttribute="top" secondItem="eRu-pz-jIm" secondAttribute="top" constant="4" id="wql-Pa-yTl"/>
<constraint firstItem="e9V-0U-UUn" firstAttribute="leading" secondItem="eRu-pz-jIm" secondAttribute="leading" constant="4" id="x6J-bC-J20"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="87u-BX-UjI"/>
<exclude reference="AN1-74-QVu"/>
</mask>
</variation>
<variation key="heightClass=compact">
<mask key="constraints">
<exclude reference="s4J-Rs-rGc"/>
<include reference="87u-BX-UjI"/>
<include reference="AN1-74-QVu"/>
</mask>
</variation>
</view>
<connections>
<outlet property="hrvMapHiddenLeading" destination="AN1-74-QVu" id="wFN-CM-cW3"/>
<outlet property="hrvMapVisibleLeading" destination="87u-BX-UjI" id="aCV-5I-Z51"/>
<outlet property="mapView" destination="oBs-Bc-V97" id="Yme-R0-pmw"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="N59-vs-o5n" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="122" y="1530"/>
</scene>
</scenes>
</document>
import UIKit
class StackTraitViewController: UIViewController {
@IBOutlet var mapView: UILabel!
@IBOutlet var hrvMapVisibleLeading: NSLayoutConstraint!
@IBOutlet var hrvMapHiddenLeading: NSLayoutConstraint!
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.setNavigationBarHidden(true, animated: false)
// tap anywhere to hide / show the mapView
let t = UITapGestureRecognizer(target: self, action: #selector(self.tapped))
view.addGestureRecognizer(t)
}
@objc func tapped() -> Void {
mapView.isHidden.toggle()
// if mapView is Hidden
// set HeartRateView's "VisibleLeading" constraint Priority to Low
// set HeartRateView's "HiddenLeading" constraint Priority to High
// otherwise,
// set HeartRateView's "VisibleLeading" constraint Priority to High
// set HeartRateView's "HiddenLeading" constraint Priority to Low
hrvMapVisibleLeading.priority = mapView.isHidden ? .defaultLow : .defaultHigh
hrvMapHiddenLeading.priority = mapView.isHidden ? .defaultHigh : .defaultLow
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment