Skip to content

Commit

Permalink
Autolayout fixes (#240)
Browse files Browse the repository at this point in the history
* Fix splash background

* Fix symptom flow headers autolayout
  • Loading branch information
ivnsch authored Jun 8, 2020
1 parent f6c4a9d commit 664e42d
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 100 deletions.
45 changes: 39 additions & 6 deletions CoEpi/Assets.xcassets/Background_purple.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Background.png",
"idiom" : "universal",
"resizing" : {
"cap-insets" : {
"left" : 0,
"right" : 0
},
"center" : {
"mode" : "tile",
"width" : 375
},
"mode" : "3-part-horizontal"
},
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"idiom" : "universal",
"resizing" : {
"cap-insets" : {
"left" : 0,
"right" : 0
},
"center" : {
"mode" : "tile",
"width" : 750
},
"mode" : "3-part-horizontal"
},
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"idiom" : "universal",
"resizing" : {
"cap-insets" : {
"left" : 0,
"right" : 0
},
"center" : {
"mode" : "tile",
"width" : 1125
},
"mode" : "3-part-horizontal"
},
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
21 changes: 0 additions & 21 deletions CoEpi/Assets.xcassets/HeaderLabel.imageset/Contents.json

This file was deleted.

Binary file not shown.
18 changes: 10 additions & 8 deletions CoEpi/ui/launch screen/CoEpiLaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_5" orientation="portrait" appearance="light"/>
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
Expand All @@ -13,34 +13,36 @@
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Background_purple" translatesAutoresizingMaskIntoConstraints="NO" id="fWF-iZ-XHk">
<rect key="frame" x="-30" y="0.0" width="523" height="896"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Background_purple" translatesAutoresizingMaskIntoConstraints="NO" id="fWF-iZ-XHk">
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coepi_family" translatesAutoresizingMaskIntoConstraints="NO" id="Irt-Qq-2mX">
<rect key="frame" x="158" y="372" width="98" height="152"/>
<rect key="frame" x="368" y="521" width="98" height="152"/>
<constraints>
<constraint firstAttribute="height" constant="152" id="QUo-0U-PaC"/>
<constraint firstAttribute="width" constant="98" id="gXM-zx-Cuo"/>
</constraints>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copyright © 2020 CoEpi. See MIT License." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="Q9x-95-YRB">
<rect key="frame" x="20" y="824" width="374" height="18"/>
<rect key="frame" x="20" y="1136" width="794" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="CoEpiPurple"/>
<constraints>
<constraint firstItem="Irt-Qq-2mX" firstAttribute="top" secondItem="Bcu-3y-fUS" secondAttribute="bottom" constant="-490" id="AWN-rx-g4f"/>
<constraint firstItem="fWF-iZ-XHk" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="23q-ll-Os1"/>
<constraint firstAttribute="trailing" secondItem="fWF-iZ-XHk" secondAttribute="trailing" id="79c-Va-N7g"/>
<constraint firstAttribute="bottom" secondItem="fWF-iZ-XHk" secondAttribute="bottom" id="KDq-hv-dVM"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="Q9x-95-YRB" secondAttribute="bottom" constant="20" id="QV1-Iq-HEY"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="trailing" secondItem="Q9x-95-YRB" secondAttribute="trailing" constant="20" id="YFx-0W-Tab"/>
<constraint firstItem="Irt-Qq-2mX" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="ZcN-eT-edw"/>
<constraint firstItem="Q9x-95-YRB" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" id="bpo-2q-1wf"/>
<constraint firstItem="fWF-iZ-XHk" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="dW4-wm-ayt"/>
<constraint firstItem="Irt-Qq-2mX" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="pJJ-y1-n7c"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -21,10 +22,11 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="HeaderLabel" translatesAutoresizingMaskIntoConstraints="NO" id="vst-Vo-bEA">
<rect key="frame" x="0.0" y="-6" width="414" height="221"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="vst-Vo-bEA">
<rect key="frame" x="0.0" y="44" width="414" height="130"/>
<color key="backgroundColor" name="CoEpiPurple"/>
<constraints>
<constraint firstAttribute="width" secondItem="vst-Vo-bEA" secondAttribute="height" multiplier="15:8" id="keY-4P-7m9"/>
<constraint firstAttribute="height" constant="130" id="wwU-cI-g5U"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uCG-ck-F1L">
Expand All @@ -40,7 +42,7 @@
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="G7E-9C-4qw">
<rect key="frame" x="20" y="235" width="374" height="557"/>
<rect key="frame" x="20" y="194" width="374" height="598"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</tableView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pqb-G8-7Wf">
Expand All @@ -62,7 +64,7 @@
<constraint firstItem="G7E-9C-4qw" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="KEP-Az-Gwb"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="vst-Vo-bEA" secondAttribute="trailing" id="RPs-4w-u87"/>
<constraint firstItem="uCG-ck-F1L" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="e0z-fY-njF"/>
<constraint firstItem="vst-Vo-bEA" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="-50" id="e2m-Xi-1oh"/>
<constraint firstItem="vst-Vo-bEA" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="e2m-Xi-1oh"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="G7E-9C-4qw" secondAttribute="trailing" constant="20" id="fAS-Eq-BvI"/>
<constraint firstItem="vst-Vo-bEA" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="iyN-d5-m7y"/>
<constraint firstItem="G7E-9C-4qw" firstAttribute="top" secondItem="vst-Vo-bEA" secondAttribute="bottom" constant="20" id="qpl-BV-GdI"/>
Expand All @@ -76,6 +78,8 @@
</view>
</objects>
<resources>
<image name="HeaderLabel" width="375" height="109"/>
<namedColor name="CoEpiPurple">
<color red="0.52899998426437378" green="0.0080000003799796104" blue="0.83099997043609619" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</namedColor>
</resources>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="HeaderLabel" translatesAutoresizingMaskIntoConstraints="NO" id="A8h-nP-Yxg">
<rect key="frame" x="0.0" y="-6" width="414" height="221"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="A8h-nP-Yxg">
<rect key="frame" x="0.0" y="44" width="414" height="130"/>
<color key="backgroundColor" name="CoEpiPurple"/>
<constraints>
<constraint firstAttribute="width" secondItem="A8h-nP-Yxg" secondAttribute="height" multiplier="15:8" id="up9-bw-Q27"/>
<constraint firstAttribute="height" constant="130" id="sfQ-9J-8Bt"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="0Bb-Lr-D2i">
Expand Down Expand Up @@ -115,7 +116,7 @@
<constraint firstItem="0Bb-Lr-D2i" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="6dD-Tf-hTj"/>
<constraint firstItem="fY1-7k-Cio" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="50" id="7bS-wE-4TJ"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="A8h-nP-Yxg" secondAttribute="trailing" id="Byc-SZ-97M"/>
<constraint firstItem="A8h-nP-Yxg" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="-50" id="CIR-Td-LVm"/>
<constraint firstItem="A8h-nP-Yxg" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="CIR-Td-LVm"/>
<constraint firstItem="cdI-6i-dZV" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="Cla-fH-twc"/>
<constraint firstItem="0Bb-Lr-D2i" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Day-94-aex"/>
<constraint firstItem="fY1-7k-Cio" firstAttribute="top" secondItem="0Bb-Lr-D2i" secondAttribute="bottom" constant="50" id="KDX-yu-U5n"/>
Expand All @@ -130,7 +131,6 @@
</view>
</objects>
<resources>
<image name="HeaderLabel" width="375" height="109"/>
<namedColor name="CoEpiPurple">
<color red="0.52899998426437378" green="0.0080000003799796104" blue="0.83099997043609619" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</namedColor>
Expand Down
10 changes: 5 additions & 5 deletions CoEpi/ui/symptomReport/FollowUp/Cough/CoughHowViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="HeaderLabel" translatesAutoresizingMaskIntoConstraints="NO" id="gWz-1A-4PQ">
<rect key="frame" x="0.0" y="-6" width="414" height="221"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gWz-1A-4PQ">
<rect key="frame" x="0.0" y="44" width="414" height="130"/>
<color key="backgroundColor" name="CoEpiPurple"/>
<constraints>
<constraint firstAttribute="width" secondItem="gWz-1A-4PQ" secondAttribute="height" multiplier="15:8" id="Vwn-TQ-3jd"/>
<constraint firstAttribute="height" constant="130" id="0hC-yg-rnx"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="25" translatesAutoresizingMaskIntoConstraints="NO" id="Jh3-AA-7SI">
Expand Down Expand Up @@ -115,7 +116,7 @@
<constraint firstItem="JeL-hi-Tam" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="20" id="UkY-Rs-swo"/>
<constraint firstItem="487-Y9-TrA" firstAttribute="top" secondItem="Jh3-AA-7SI" secondAttribute="bottom" constant="50" id="Xyz-sX-NtB"/>
<constraint firstItem="487-Y9-TrA" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="50" id="acw-NU-Okx"/>
<constraint firstItem="gWz-1A-4PQ" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="-50" id="bRI-he-WJC"/>
<constraint firstItem="gWz-1A-4PQ" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="bRI-he-WJC"/>
<constraint firstItem="Jh3-AA-7SI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="epm-en-9hg"/>
<constraint firstItem="Jh3-AA-7SI" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="50" id="gsb-x5-5HF"/>
<constraint firstItem="JeL-hi-Tam" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="iRo-cO-4kD"/>
Expand All @@ -127,7 +128,6 @@
</view>
</objects>
<resources>
<image name="HeaderLabel" width="375" height="109"/>
<image name="largeOvalButton_Selected" width="294" height="54"/>
<namedColor name="CoEpiPurple">
<color red="0.52899998426437378" green="0.0080000003799796104" blue="0.83099997043609619" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
Expand Down
Loading

0 comments on commit 664e42d

Please sign in to comment.