UI: profile creation
- prevent keyboard from covering text
Change-Id: I810f16fe133a553d92bc5c07e122bf4f29d999bd
diff --git a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard
index 710f9fe..9344c52 100644
--- a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard
+++ b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard
@@ -21,61 +21,123 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Personalise your profile !" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="awD-Hy-m7O" userLabel="Create Profil Account Title">
- <rect key="frame" x="41" y="50" width="332" height="37"/>
- <fontDescription key="fontDescription" type="system" weight="thin" pointSize="31"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your profile will be shared with your contacts. You can change it at any time." textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8lL-e0-PFL" userLabel="Subtitle">
- <rect key="frame" x="43" y="92" width="328" height="38.333333333333343"/>
- <fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="16"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter a display name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N1N-hn-LTy" userLabel="Enter Name Label">
- <rect key="frame" x="50" y="285" width="166" height="22"/>
- <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter name" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Ebb-h3-1X3" userLabel="Profile Name Edit Text">
- <rect key="frame" x="40" y="317" width="334" height="50"/>
+ <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" keyboardDismissMode="interactive" translatesAutoresizingMaskIntoConstraints="NO" id="onC-vk-VGN">
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+ <subviews>
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Yq-n7-91P">
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Personalise your profile !" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="awD-Hy-m7O" userLabel="Create Profil Account Title">
+ <rect key="frame" x="41" y="20" width="332" height="37"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="31"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
+ <color key="value" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
+ <color key="value" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your profile will be shared with your contacts. You can change it at any time." textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8lL-e0-PFL" userLabel="Subtitle">
+ <rect key="frame" x="43" y="62" width="328" height="38.333333333333343"/>
+ <fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="16"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter a display name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N1N-hn-LTy" userLabel="Enter Name Label">
+ <rect key="frame" x="124" y="255" width="166" height="22"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter name" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Ebb-h3-1X3" userLabel="Profile Name Edit Text">
+ <rect key="frame" x="92" y="287" width="230" height="50"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="50" id="V3Q-1d-nI7"/>
+ </constraints>
+ <nil key="textColor"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" returnKeyType="done"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+ <real key="value" value="1.5"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </textField>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Po-6e-k14" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="92" y="352" width="230" height="50"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="50" id="2ir-B7-kVX"/>
+ <constraint firstAttribute="width" constant="230" id="DZF-Ea-XUf"/>
+ </constraints>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <state key="normal" title="Skip">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
+ </userDefinedRuntimeAttributes>
+ </button>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="Wss-Rm-aKz">
+ <rect key="frame" x="-49" y="116.33333333333331" width="512" height="120"/>
+ <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="120" id="Edd-cj-Zhl"/>
+ </constraints>
+ </imageView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <constraints>
+ <constraint firstItem="Ebb-h3-1X3" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="3Do-Tm-CjF"/>
+ <constraint firstItem="8lL-e0-PFL" firstAttribute="top" secondItem="awD-Hy-m7O" secondAttribute="bottom" constant="5" id="3F6-Ff-39y"/>
+ <constraint firstItem="Wss-Rm-aKz" firstAttribute="centerY" secondItem="8lL-e0-PFL" secondAttribute="centerY" constant="95" id="8Qr-wz-HY8"/>
+ <constraint firstItem="8lL-e0-PFL" firstAttribute="leading" secondItem="awD-Hy-m7O" secondAttribute="leading" constant="2" id="9JW-wG-hwj"/>
+ <constraint firstItem="awD-Hy-m7O" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="Aga-Wd-ufN"/>
+ <constraint firstItem="Ebb-h3-1X3" firstAttribute="trailing" secondItem="5Po-6e-k14" secondAttribute="trailing" id="Bpd-sp-mVf"/>
+ <constraint firstItem="8lL-e0-PFL" firstAttribute="centerX" secondItem="awD-Hy-m7O" secondAttribute="centerX" id="DsF-5E-I7H"/>
+ <constraint firstItem="5Po-6e-k14" firstAttribute="top" secondItem="Ebb-h3-1X3" secondAttribute="bottom" constant="15" id="GKk-BK-UGw"/>
+ <constraint firstItem="N1N-hn-LTy" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="Jec-k5-B5z"/>
+ <constraint firstItem="N1N-hn-LTy" firstAttribute="bottom" secondItem="Ebb-h3-1X3" secondAttribute="top" constant="-10" id="K28-vG-Lqa"/>
+ <constraint firstItem="awD-Hy-m7O" firstAttribute="trailing" secondItem="8lL-e0-PFL" secondAttribute="trailing" constant="2" id="MbE-QI-d41"/>
+ <constraint firstItem="awD-Hy-m7O" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="0Yq-n7-91P" secondAttribute="leading" constant="30" id="PLT-r4-IJi"/>
+ <constraint firstItem="awD-Hy-m7O" firstAttribute="top" secondItem="0Yq-n7-91P" secondAttribute="top" constant="20" id="RH8-9b-Zoa"/>
+ <constraint firstItem="Wss-Rm-aKz" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="cwW-zq-rDS"/>
+ <constraint firstItem="Ebb-h3-1X3" firstAttribute="top" secondItem="awD-Hy-m7O" secondAttribute="bottom" constant="230" id="pUg-Md-sif"/>
+ <constraint firstItem="Ebb-h3-1X3" firstAttribute="leading" secondItem="5Po-6e-k14" secondAttribute="leading" id="vDa-Un-6um"/>
+ <constraint firstItem="5Po-6e-k14" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="y3z-G3-Ew5"/>
+ </constraints>
+ </view>
+ </subviews>
<constraints>
- <constraint firstAttribute="height" constant="50" id="V3Q-1d-nI7"/>
+ <constraint firstAttribute="trailing" secondItem="0Yq-n7-91P" secondAttribute="trailing" id="8xB-Ab-Iwg"/>
+ <constraint firstAttribute="bottom" secondItem="0Yq-n7-91P" secondAttribute="bottom" id="C9j-OQ-uWc"/>
+ <constraint firstItem="0Yq-n7-91P" firstAttribute="centerX" secondItem="onC-vk-VGN" secondAttribute="centerX" id="Slz-Um-pcQ"/>
+ <constraint firstItem="0Yq-n7-91P" firstAttribute="leading" secondItem="onC-vk-VGN" secondAttribute="leading" id="bVK-Hs-dbe"/>
+ <constraint firstItem="0Yq-n7-91P" firstAttribute="top" secondItem="onC-vk-VGN" secondAttribute="top" id="fPr-Fq-DBB"/>
</constraints>
- <nil key="textColor"/>
- <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
- <textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" returnKeyType="done"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
- <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
- <real key="value" value="1.5"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
- <color key="value" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </userDefinedRuntimeAttribute>
- </userDefinedRuntimeAttributes>
- </textField>
- <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Po-6e-k14" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="40" y="382" width="334" height="50"/>
- <constraints>
- <constraint firstAttribute="height" constant="50" id="2ir-B7-kVX"/>
- <constraint firstAttribute="width" relation="lessThanOrEqual" constant="500" id="zjk-A5-ePp"/>
- </constraints>
- <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
- <state key="normal" title="Skip">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </state>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
- </userDefinedRuntimeAttributes>
- </button>
+ </scrollView>
<view hidden="YES" alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SRA-lP-OD3" userLabel="Info View">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<subviews>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="z2z-6h-lsY">
+ <rect key="frame" x="-49" y="116.33333333333331" width="512" height="120"/>
+ <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="120" id="6Y2-EN-n8A"/>
+ </constraints>
+ </imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="info_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="RuJ-k9-6d2" userLabel="Arrow">
- <rect key="frame" x="91" y="261.33333333333331" width="72" height="80"/>
+ <rect key="frame" x="91" y="231.33333333333337" width="72" height="80"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="RIv-ZQ-8Uw"/>
@@ -83,7 +145,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Create your avatar" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dwE-6U-bqU">
- <rect key="frame" x="27" y="346.33333333333331" width="160" height="55.666666666666686"/>
+ <rect key="frame" x="27" y="316.33333333333331" width="160" height="55.666666666666686"/>
<constraints>
<constraint firstAttribute="width" constant="160" id="emA-LP-rz8"/>
</constraints>
@@ -98,55 +160,41 @@
<constraint firstItem="dwE-6U-bqU" firstAttribute="top" secondItem="RuJ-k9-6d2" secondAttribute="bottom" constant="5" id="JgS-NR-vpD"/>
</constraints>
</view>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="Wss-Rm-aKz">
- <rect key="frame" x="-49" y="146.33333333333334" width="512" height="120.00000000000003"/>
- <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
- <constraints>
- <constraint firstAttribute="height" constant="120" id="Edd-cj-Zhl"/>
- </constraints>
- </imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
- <constraint firstItem="awD-Hy-m7O" firstAttribute="trailing" secondItem="8lL-e0-PFL" secondAttribute="trailing" constant="2" id="2Xb-gV-dwt"/>
- <constraint firstItem="RuJ-k9-6d2" firstAttribute="centerY" secondItem="Wss-Rm-aKz" secondAttribute="centerY" constant="95" id="4Kc-TM-nKs"/>
- <constraint firstItem="5Po-6e-k14" firstAttribute="centerX" secondItem="N1T-Xh-FH1" secondAttribute="centerX" id="6Er-Ji-65T"/>
- <constraint firstItem="awD-Hy-m7O" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="N1T-Xh-FH1" secondAttribute="leading" constant="30" id="6iu-g8-KUu"/>
- <constraint firstItem="5Po-6e-k14" firstAttribute="leading" secondItem="N1T-Xh-FH1" secondAttribute="leading" priority="750" constant="40" id="B2e-TD-IW7"/>
- <constraint firstItem="8lL-e0-PFL" firstAttribute="top" secondItem="awD-Hy-m7O" secondAttribute="bottom" constant="5" id="BNi-Zx-8Lg"/>
- <constraint firstItem="8lL-e0-PFL" firstAttribute="centerX" secondItem="awD-Hy-m7O" secondAttribute="centerX" id="CIq-7F-LLR"/>
- <constraint firstItem="awD-Hy-m7O" firstAttribute="top" secondItem="N1T-Xh-FH1" secondAttribute="top" constant="50" id="JI3-L9-BKu"/>
+ <constraint firstAttribute="trailing" secondItem="onC-vk-VGN" secondAttribute="trailing" id="7iQ-8c-car"/>
+ <constraint firstItem="z2z-6h-lsY" firstAttribute="bottom" secondItem="Wss-Rm-aKz" secondAttribute="bottom" id="D4B-DH-MWN"/>
+ <constraint firstItem="z2z-6h-lsY" firstAttribute="trailing" secondItem="Wss-Rm-aKz" secondAttribute="trailing" id="IGd-7P-J0A"/>
<constraint firstItem="SRA-lP-OD3" firstAttribute="centerX" secondItem="N1T-Xh-FH1" secondAttribute="centerX" id="L5D-cA-NbO"/>
- <constraint firstItem="N1N-hn-LTy" firstAttribute="leading" secondItem="Ebb-h3-1X3" secondAttribute="leading" constant="10" id="O6F-EG-zPD"/>
- <constraint firstItem="Ebb-h3-1X3" firstAttribute="centerX" secondItem="N1T-Xh-FH1" secondAttribute="centerX" id="OX2-vA-qUT"/>
- <constraint firstAttribute="trailing" secondItem="5Po-6e-k14" secondAttribute="trailing" priority="750" constant="40" id="PJX-xR-0Bj"/>
+ <constraint firstItem="RuJ-k9-6d2" firstAttribute="centerX" secondItem="Wss-Rm-aKz" secondAttribute="centerX" constant="-80" id="SSH-g7-OVB"/>
+ <constraint firstItem="onC-vk-VGN" firstAttribute="leading" secondItem="N1T-Xh-FH1" secondAttribute="leading" id="SWE-OK-hxY"/>
+ <constraint firstItem="RuJ-k9-6d2" firstAttribute="centerY" secondItem="Wss-Rm-aKz" secondAttribute="centerY" constant="95" id="SXy-dy-AW4"/>
<constraint firstItem="dwE-6U-bqU" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="N1T-Xh-FH1" secondAttribute="leading" id="UrR-Rk-M45"/>
<constraint firstItem="SRA-lP-OD3" firstAttribute="width" secondItem="N1T-Xh-FH1" secondAttribute="width" id="XSG-yQ-96Y"/>
- <constraint firstItem="Ebb-h3-1X3" firstAttribute="leading" secondItem="5Po-6e-k14" secondAttribute="leading" id="Xbm-L4-PH0"/>
- <constraint firstItem="8lL-e0-PFL" firstAttribute="leading" secondItem="awD-Hy-m7O" secondAttribute="leading" constant="2" id="YUd-xJ-jOH"/>
- <constraint firstItem="awD-Hy-m7O" firstAttribute="centerX" secondItem="N1T-Xh-FH1" secondAttribute="centerX" id="aSq-L1-WUN"/>
- <constraint firstItem="N1N-hn-LTy" firstAttribute="bottom" secondItem="Ebb-h3-1X3" secondAttribute="top" constant="-10" id="dlR-3S-vEj"/>
<constraint firstItem="SRA-lP-OD3" firstAttribute="centerY" secondItem="N1T-Xh-FH1" secondAttribute="centerY" id="gfL-Tg-u84"/>
- <constraint firstItem="Ebb-h3-1X3" firstAttribute="trailing" secondItem="5Po-6e-k14" secondAttribute="trailing" id="jx6-Jq-y5N"/>
- <constraint firstItem="Wss-Rm-aKz" firstAttribute="centerX" secondItem="N1T-Xh-FH1" secondAttribute="centerX" id="lYq-EG-6p2"/>
- <constraint firstItem="RuJ-k9-6d2" firstAttribute="centerX" secondItem="Wss-Rm-aKz" secondAttribute="centerX" constant="-80" id="swq-lm-kPb"/>
- <constraint firstItem="5Po-6e-k14" firstAttribute="top" secondItem="Ebb-h3-1X3" secondAttribute="bottom" constant="15" id="uhg-tK-Rzs"/>
- <constraint firstItem="Ebb-h3-1X3" firstAttribute="top" secondItem="awD-Hy-m7O" secondAttribute="bottom" constant="230" id="utQ-gU-BnA"/>
- <constraint firstItem="Wss-Rm-aKz" firstAttribute="centerY" secondItem="8lL-e0-PFL" secondAttribute="centerY" constant="95" id="vUF-XR-xMv"/>
+ <constraint firstItem="z2z-6h-lsY" firstAttribute="top" secondItem="Wss-Rm-aKz" secondAttribute="top" id="h8q-jk-Q0P"/>
+ <constraint firstItem="z2z-6h-lsY" firstAttribute="leading" secondItem="Wss-Rm-aKz" secondAttribute="leading" id="ilh-ac-a6m"/>
+ <constraint firstAttribute="bottom" secondItem="onC-vk-VGN" secondAttribute="bottom" id="kIf-ew-JtO"/>
+ <constraint firstItem="0Yq-n7-91P" firstAttribute="height" secondItem="N1T-Xh-FH1" secondAttribute="height" id="lMB-G4-4Tm"/>
+ <constraint firstItem="0Yq-n7-91P" firstAttribute="width" secondItem="N1T-Xh-FH1" secondAttribute="width" id="pW7-2U-vWL"/>
+ <constraint firstItem="onC-vk-VGN" firstAttribute="top" secondItem="N1T-Xh-FH1" secondAttribute="top" id="zTu-Eg-J4X"/>
<constraint firstItem="SRA-lP-OD3" firstAttribute="height" secondItem="N1T-Xh-FH1" secondAttribute="height" id="zvp-kO-3Dx"/>
</constraints>
</view>
<connections>
<outlet property="arrow" destination="RuJ-k9-6d2" id="sfC-3H-hGp"/>
<outlet property="arrowHeightConstraint" destination="RIv-ZQ-8Uw" id="wPN-ra-uLi"/>
- <outlet property="arrowYConstraint" destination="4Kc-TM-nKs" id="BOB-Zp-FvZ"/>
+ <outlet property="arrowYConstraint" destination="SXy-dy-AW4" id="tL4-Ml-YxQ"/>
<outlet property="createProfilAccountTitle" destination="awD-Hy-m7O" id="0tW-KX-h7q"/>
<outlet property="createYourAvatarLabel" destination="dwE-6U-bqU" id="eNT-V7-RAm"/>
<outlet property="enterNameLabel" destination="N1N-hn-LTy" id="4gq-l5-bHn"/>
+ <outlet property="infoProfileImage" destination="z2z-6h-lsY" id="XkJ-uW-3b9"/>
<outlet property="infoView" destination="SRA-lP-OD3" id="vVC-8B-yPg"/>
- <outlet property="profileImageView" destination="Wss-Rm-aKz" id="Q3Z-ch-BNJ"/>
- <outlet property="profileImageViewHeightConstraint" destination="Edd-cj-Zhl" id="QQC-Et-mpk"/>
+ <outlet property="profileImageView" destination="Wss-Rm-aKz" id="jZn-FJ-bld"/>
+ <outlet property="profileImageViewHeightConstraint" destination="6Y2-EN-n8A" id="aeG-wN-pUc"/>
<outlet property="profileName" destination="Ebb-h3-1X3" id="UGL-Fz-ZaN"/>
+ <outlet property="scrollView" destination="onC-vk-VGN" id="wci-Bf-e1y"/>
<outlet property="skipButton" destination="5Po-6e-k14" id="DUG-Am-Mwn"/>
<outlet property="subtitle" destination="8lL-e0-PFL" id="kE0-4o-mB4"/>
</connections>
diff --git a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift
index 617571a..391a910 100644
--- a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift
+++ b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift
@@ -37,6 +37,8 @@
@IBOutlet weak var createProfilAccountTitle: UILabel!
@IBOutlet weak var skipButton: DesignableButton!
@IBOutlet weak var profileImageViewHeightConstraint: NSLayoutConstraint!
+ @IBOutlet weak var scrollView: UIScrollView!
+ @IBOutlet weak var infoProfileImage: UIImageView!
// MARK: members
private let disposeBag = DisposeBag()
@@ -57,6 +59,10 @@
self.profileImageView.layer.shadowOffset = CGSize.zero
self.profileImageView.layer.shadowRadius = 4
self.profileName.tintColor = UIColor.jamiSecondary
+ self.infoProfileImage.layer.shadowColor = UIColor.gray.cgColor
+ self.infoProfileImage.layer.shadowOpacity = 0.5
+ self.infoProfileImage.layer.shadowOffset = CGSize.zero
+ self.infoProfileImage.layer.shadowRadius = 4
// Animations
DispatchQueue.global(qos: .background).async {
@@ -68,7 +74,7 @@
self?.arrowHeightConstraint.constant = 100
})
self?.arrow.tintColor = UIColor.white
- UIView.animate(withDuration: 5, animations: {
+ UIView.animate(withDuration: 1, animations: {
self?.arrowYConstraint.constant = 70
self?.view.layoutIfNeeded()
})
@@ -108,13 +114,19 @@
self.viewModel.proceedWithAccountCreationOrDeviceLink()
}).disposed(by: self.disposeBag)
+ let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(imageTapped(tapGestureRecognizer:)))
+ infoProfileImage.isUserInteractionEnabled = true
+ infoProfileImage.addGestureRecognizer(tapGestureRecognizer)
+
// handle keyboard
+ self.adaptToKeyboardState(for: self.scrollView, with: self.disposeBag)
keyboardDismissTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
}
func dismissInfoView() {
UIView.animate(withDuration: 0.3, animations: { [weak self] in
self?.infoView.alpha = 0
+ self?.infoProfileImage.removeFromSuperview()
},completion: { _ in self.infoView.isHidden = true })
}
@@ -130,7 +142,6 @@
@objc func keyboardWillAppear(withNotification: NSNotification){
self.view.addGestureRecognizer(keyboardDismissTapRecognizer)
-
}
@objc func keyboardWillDisappear(withNotification: NSNotification){
@@ -160,7 +171,7 @@
shadow2Animation.toValue = 0.5
shadow2Animation.duration = 0.2
- self.profileImageView.layer.add(shadow1Animation, forKey: shadow1Animation.keyPath)
+ self.infoProfileImage.layer.add(shadow1Animation, forKey: shadow1Animation.keyPath)
DispatchQueue.global(qos: .background).async {
DispatchQueue.main.async { [weak self] in
@@ -172,9 +183,9 @@
}
usleep(200000)
DispatchQueue.main.async {
- self.profileImageView.layer.removeAllAnimations()
- self.profileImageView.layer.add(shadow2Animation, forKey: shadow2Animation.keyPath)
- self.profileImageView.layer.shadowOpacity = 0.5
+ self.infoProfileImage.layer.removeAllAnimations()
+ self.infoProfileImage.layer.add(shadow2Animation, forKey: shadow2Animation.keyPath)
+ self.infoProfileImage.layer.shadowOpacity = 0.5
UIView.animate(withDuration: 0.2, animations: {
self.profileImageViewHeightConstraint.constant = 120
self.view.layoutIfNeeded()