diff --git a/Ring/Ring/Extensions/UILabel+Ring.swift b/Ring/Ring/Extensions/UILabel+Ring.swift index 585751aca1a49e1b33599054d503f180c9165cef..13604b35df4c93d2f06c0de73ca484f7004ded10 100644 --- a/Ring/Ring/Extensions/UILabel+Ring.swift +++ b/Ring/Ring/Extensions/UILabel+Ring.swift @@ -30,4 +30,12 @@ extension UILabel { range: NSRange(location: 0, length: withText.utf16.count)) self.attributedText = attrString } + + func ajustToTextSize() { + self.minimumScaleFactor = 0.5 + self.numberOfLines = 0 + self.adjustsFontSizeToFitWidth = true + self.textAlignment = .center + self.lineBreakMode = .byWordWrapping + } } diff --git a/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.storyboard b/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.storyboard index 459e12ef8c1f68be24e308fb5d49b660f1e66f26..091068af3ebe91343d24472309548d9a495bc0d0 100644 --- a/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.storyboard +++ b/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.storyboard @@ -116,6 +116,7 @@ <rect key="frame" x="15" y="0.0" width="184.5" height="44"/> <fontDescription key="fontDescription" type="system" weight="light" pointSize="19"/> <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/> <state key="normal" title=" Video Call" image="video_running"> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </state> @@ -132,6 +133,7 @@ <rect key="frame" x="0.0" y="0.0" width="184.5" height="44"/> <fontDescription key="fontDescription" type="system" weight="light" pointSize="19"/> <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/> <state key="normal" title=" Audio Call" image="call_button"> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </state> diff --git a/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.swift b/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.swift index 598a083b093cec67f7356cd4a07dd1e7d41af37f..a7fd20860aea540785844317dce8b6209a857c89 100644 --- a/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.swift +++ b/Ring/Ring/Features/Conversations/SmartList/IncognitoSmartListViewController.swift @@ -83,6 +83,8 @@ class IncognitoSmartListViewController: UIViewController, StoryboardBased, ViewM view.backgroundColor = UIColor.jamiBackgroundSecondaryColor self.placeVideoCall.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) self.placeAudioCall.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + placeVideoCall.titleLabel?.ajustToTextSize() + placeAudioCall.titleLabel?.ajustToTextSize() self.boothSwitch.setTitleColor(.jamiTextSecondary, for: .normal) self.searchView.editSearch .subscribe(onNext: {[weak self] (editing) in diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard index 9642d3064800b4647085ab8e08c672b2c97f457e..54b444b7809422b8428e613ffa236931d0eab52c 100644 --- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jUh-Lp-ulu"> - <device id="retina3_5" orientation="portrait" appearance="light"/> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jUh-Lp-ulu"> + <device id="retina5_5" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -16,17 +16,17 @@ <viewControllerLayoutGuide type="bottom" id="fgQ-1h-rMi"/> </layoutGuides> <view key="view" clipsSubviews="YES" contentMode="scaleToFill" id="7Ub-Rk-fjK"> - <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> + <rect key="frame" x="0.0" y="0.0" width="414" height="736"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" keyboardDismissMode="interactive" translatesAutoresizingMaskIntoConstraints="NO" id="UZB-Gb-Dp2"> - <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> + <rect key="frame" x="0.0" y="0.0" width="414" height="736"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g3i-8d-O4a" userLabel="Container View" customClass="DesignableView" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="0.0" width="320" height="316.5"/> + <rect key="frame" x="0.0" y="0.0" width="414" height="316.66666666666669"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Register a username" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qeI-Uf-g3M"> - <rect key="frame" x="45" y="20" width="171" height="21.5"/> + <rect key="frame" x="30" y="20" width="295" height="21.666666666666671"/> <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"/> @@ -37,20 +37,20 @@ </userDefinedRuntimeAttributes> </label> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hzc-aD-41e"> - <rect key="frame" x="226" y="15.5" width="51" height="31"/> + <rect key="frame" x="335" y="15.333333333333336" width="51" height="31"/> <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(Recommended)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QTZ-o9-LER"> - <rect key="frame" x="45" y="41.5" width="80" height="12"/> + <rect key="frame" x="30" y="41.666666666666664" width="80" height="12"/> <fontDescription key="fontDescription" type="system" pointSize="10"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4YB-Ka-7tL"> - <rect key="frame" x="35" y="71.5" width="250" height="65"/> + <rect key="frame" x="20" y="71.666666666666671" width="374" height="65.000000000000014"/> <subviews> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Username" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E18-Hh-7He" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="0.0" width="250" height="50"/> + <rect key="frame" x="0.0" y="0.0" width="374" height="50"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="50" id="BAO-oa-Ecp"/> @@ -89,26 +89,26 @@ </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Choose a password" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BLe-wx-zKe" userLabel="Register Password Label"> - <rect key="frame" x="45" y="148.5" width="171" height="21.5"/> + <rect key="frame" x="30" y="148.33333333333334" width="295" height="21.666666666666657"/> <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> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="WaK-DM-X0c" userLabel="Password Switch"> - <rect key="frame" x="226" y="143.5" width="51" height="31"/> + <rect key="frame" x="335" y="143.66666666666666" width="51" height="31"/> <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IVi-pM-qbp" userLabel="Choose Password View"> - <rect key="frame" x="35" y="194.5" width="250" height="0.0"/> + <rect key="frame" x="20" y="194.66666666666666" width="374" height="0.0"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Choose a password to encrypt your local account. Don’t forget it or you will lose access to your account" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gh1-3j-vN7" userLabel="Password Information"> - <rect key="frame" x="15" y="0.0" width="220" height="76.5"/> + <rect key="frame" x="15" y="0.0" width="344" height="57.333333333333336"/> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="16"/> <color key="textColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="jhr-UL-eCl" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="86.5" width="250" height="50"/> + <rect key="frame" x="0.0" y="67.333333333333343" width="374" height="50"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="50" id="eGy-0v-Pm0"/> @@ -126,7 +126,7 @@ </userDefinedRuntimeAttributes> </textField> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Confirm password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ODL-4B-fCm" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="146.5" width="250" height="50"/> + <rect key="frame" x="0.0" y="127.33333333333334" width="374" height="50"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="50" id="iUA-8a-sP7"/> @@ -144,7 +144,7 @@ </userDefinedRuntimeAttributes> </textField> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="passwords do not match" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IWj-x1-hN9"> - <rect key="frame" x="15" y="202.5" width="149" height="16"/> + <rect key="frame" x="15" y="183.33333333333334" width="149" height="16"/> <fontDescription key="fontDescription" type="system" pointSize="13"/> <color key="textColor" red="0.83137254901960778" green="0.054901960784313725" blue="0.070588235294117646" alpha="0.90000000000000002" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -169,20 +169,19 @@ </constraints> </view> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8uM-V9-rGD" userLabel="Notifications Switch"> - <rect key="frame" x="226" y="205.5" width="51" height="31"/> + <rect key="frame" x="335" y="205.66666666666666" width="51" height="31"/> <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v2K-7x-35g" userLabel="Enable Notifications Label"> - <rect key="frame" x="45" y="210.5" width="151.5" height="21"/> + <rect key="frame" x="30" y="210.66666666666666" width="151.66666666666666" height="21"/> <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> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="05l-0O-Ql0" customClass="DesignableButton" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="35" y="266.5" width="250" height="50"/> + <rect key="frame" x="20" y="266.66666666666669" width="374" height="50"/> <constraints> - <constraint firstAttribute="height" constant="50" id="501-bI-E5J"/> - <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="250" id="oJ2-vB-TJG"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="501-bI-E5J"/> </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/> <color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/> @@ -198,6 +197,7 @@ <constraint firstItem="4YB-Ka-7tL" firstAttribute="trailing" secondItem="hzc-aD-41e" secondAttribute="trailing" constant="10" id="1wO-3T-tfO"/> <constraint firstItem="IVi-pM-qbp" firstAttribute="top" secondItem="WaK-DM-X0c" secondAttribute="bottom" constant="20" id="26L-Di-76k"/> <constraint firstItem="IVi-pM-qbp" firstAttribute="trailing" secondItem="4YB-Ka-7tL" secondAttribute="trailing" id="4c4-eM-gY5"/> + <constraint firstItem="05l-0O-Ql0" firstAttribute="leading" secondItem="g3i-8d-O4a" secondAttribute="leading" constant="20" id="7kN-Sb-d9i"/> <constraint firstItem="BLe-wx-zKe" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="leading" id="A2c-l4-4s0"/> <constraint firstItem="QTZ-o9-LER" firstAttribute="top" secondItem="qeI-Uf-g3M" secondAttribute="bottom" id="EHH-l0-byE"/> <constraint firstItem="WaK-DM-X0c" firstAttribute="top" secondItem="4YB-Ka-7tL" secondAttribute="bottom" constant="7" id="HEn-BC-6ew"/> @@ -213,6 +213,7 @@ <constraint firstItem="IVi-pM-qbp" firstAttribute="leading" secondItem="4YB-Ka-7tL" secondAttribute="leading" id="cUH-Og-2da"/> <constraint firstItem="hzc-aD-41e" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="trailing" constant="10" id="f4R-fq-ANd"/> <constraint firstItem="05l-0O-Ql0" firstAttribute="centerX" secondItem="g3i-8d-O4a" secondAttribute="centerX" id="fDC-6U-Uy1"/> + <constraint firstAttribute="trailing" secondItem="05l-0O-Ql0" secondAttribute="trailing" constant="20" id="gU3-Gg-0r7"/> <constraint firstItem="BLe-wx-zKe" firstAttribute="centerY" secondItem="WaK-DM-X0c" secondAttribute="centerY" id="gXy-MH-i1e"/> <constraint firstItem="hzc-aD-41e" firstAttribute="leading" secondItem="BLe-wx-zKe" secondAttribute="trailing" constant="10" id="iVP-j2-wzA"/> <constraint firstItem="8uM-V9-rGD" firstAttribute="top" secondItem="IWj-x1-hN9" secondAttribute="top" priority="1" id="pC1-Dk-oIP"/> diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift index 7128222a2a93a80b35fda53e53fb4d272b24b430..8164cbf060f89468054acd26e5e235121bc12cb7 100644 --- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift @@ -71,6 +71,7 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB self.scrollView.alwaysBounceHorizontal = false self.scrollView.alwaysBounceVertical = true self.createAccountButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + createAccountButton.titleLabel?.ajustToTextSize() self.usernameTextField.becomeFirstResponder() self.usernameTextField.tintColor = UIColor.jamiSecondary self.passwordTextField.tintColor = UIColor.jamiSecondary @@ -85,7 +86,8 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB // handle keyboard self.adaptToKeyboardState(for: self.scrollView, with: self.disposeBag) keyboardDismissTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard)) - NotificationCenter.default.rx.notification(UIDevice.orientationDidChangeNotification) + NotificationCenter.default.rx + .notification(UIDevice.orientationDidChangeNotification) .observeOn(MainScheduler.instance) .subscribe(onNext: { [weak self] (_) in self?.createAccountButton.updateGradientFrame() diff --git a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift index c02b5d73925ccc31564fc121428606eac03dee84..c7b08a033d54fa11b749f83116c7800f653a5333 100644 --- a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift @@ -55,6 +55,7 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V // Style self.skipButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + skipButton.titleLabel?.ajustToTextSize() self.profileImageView.layer.shadowColor = UIColor.gray.cgColor self.profileImageView.layer.shadowOpacity = 0.5 self.profileImageView.layer.shadowOffset = CGSize.zero diff --git a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard index a8a0f6a83bbfa799049a757ed11a8f687171c5eb..6d14e031cf49329fc02fc575f1919971fce19066 100644 --- a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="byn-Xz-pFs"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="byn-Xz-pFs"> <device id="ipad12_9rounded" orientation="portrait" layout="fullscreen" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -205,10 +205,10 @@ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="bottom" secondItem="hXV-Wg-kt6" secondAttribute="bottom" id="Bm9-i4-cTi"/> - <constraint firstAttribute="trailing" secondItem="hXV-Wg-kt6" secondAttribute="trailing" priority="750" constant="40" id="JJO-KH-cOP"/> + <constraint firstAttribute="trailing" secondItem="hXV-Wg-kt6" secondAttribute="trailing" priority="750" constant="20" id="JJO-KH-cOP"/> <constraint firstItem="hXV-Wg-kt6" firstAttribute="centerX" secondItem="daQ-3e-VKq" secondAttribute="centerX" id="RFU-L5-BJo"/> <constraint firstItem="hXV-Wg-kt6" firstAttribute="top" secondItem="daQ-3e-VKq" secondAttribute="top" constant="20" id="VAG-cb-TWE"/> - <constraint firstItem="hXV-Wg-kt6" firstAttribute="leading" secondItem="daQ-3e-VKq" secondAttribute="leading" priority="750" constant="40" id="tdh-cX-abZ"/> + <constraint firstItem="hXV-Wg-kt6" firstAttribute="leading" secondItem="daQ-3e-VKq" secondAttribute="leading" priority="750" constant="20" id="tdh-cX-abZ"/> </constraints> </view> </subviews> diff --git a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift index 7cd30fb7c510ee19e997fba46a746ff50b8e9172..1c6b6944c57490ca06f6354f137b0890c5d1e526 100644 --- a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift @@ -50,6 +50,7 @@ class CreateSipAccountViewController: UIViewController, StoryboardBased, ViewMod self.userNameTextField.becomeFirstResponder() self.configurePasswordField() self.createAccountButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + createAccountButton.titleLabel?.ajustToTextSize() // handle keyboard self.adaptToKeyboardState(for: self.scrollView, with: self.disposeBag) keyboardDismissTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard)) diff --git a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.storyboard b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.storyboard index 931285c8a8fdef6458b7ab3f693614cf4b8243d0..7b1d9c0fa5bb18858357be2fbb7e44c953ebc71a 100644 --- a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="1yn-Mj-8Ek"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="1yn-Mj-8Ek"> <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -25,7 +25,7 @@ <rect key="frame" x="0.0" y="0.0" width="375" height="343"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="fat-TI-8jn"> - <rect key="frame" x="40" y="20" width="295" height="323"/> + <rect key="frame" x="20" y="20" width="335" height="323"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="edM-LD-fKX"> <rect key="frame" x="0.0" y="0.0" width="102" height="22"/> @@ -47,7 +47,7 @@ </subviews> </stackView> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="PIN" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3CA-fY-2S2" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="32" width="295" height="50"/> + <rect key="frame" x="0.0" y="32" width="335" height="50"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="50" id="qQ4-hd-6jc"/> @@ -81,7 +81,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FyJ-Ke-ba3" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="142" width="295" height="50"/> + <rect key="frame" x="0.0" y="142" width="335" height="50"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="50" id="IYK-P5-8Up"/> @@ -106,16 +106,16 @@ </constraints> </view> <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CLR-na-fmE"> - <rect key="frame" x="0.0" y="217" width="295" height="31"/> + <rect key="frame" x="0.0" y="217" width="335" height="31"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xYz-Rm-Qsp" userLabel="Enable Notifications Label"> - <rect key="frame" x="0.0" y="0.0" width="246" height="31"/> + <rect key="frame" x="0.0" y="0.0" width="286" height="31"/> <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> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1UV-Vn-dMF" userLabel="Notifications Switch"> - <rect key="frame" x="246" y="0.0" width="51" height="31"/> + <rect key="frame" x="286" y="0.0" width="51" height="31"/> <color key="onTintColor" red="0.1215686275" green="0.28627450980000002" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> </subviews> @@ -131,7 +131,7 @@ </constraints> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BLV-X1-oI7" customClass="DesignableButton" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="273" width="295" height="50"/> + <rect key="frame" x="0.0" y="273" width="335" height="50"/> <constraints> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="500" id="3lO-u5-XKW"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="250" id="U4p-lk-qhz"/> @@ -160,8 +160,8 @@ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="fat-TI-8jn" firstAttribute="top" secondItem="HlM-9Z-7gA" secondAttribute="top" constant="20" id="26U-te-Y7U"/> - <constraint firstItem="fat-TI-8jn" firstAttribute="leading" secondItem="HlM-9Z-7gA" secondAttribute="leading" priority="750" constant="40" id="3uM-7j-awQ"/> - <constraint firstAttribute="trailing" secondItem="fat-TI-8jn" secondAttribute="trailing" priority="750" constant="40" id="GPw-na-Z5B"/> + <constraint firstItem="fat-TI-8jn" firstAttribute="leading" secondItem="HlM-9Z-7gA" secondAttribute="leading" priority="750" constant="20" id="3uM-7j-awQ"/> + <constraint firstAttribute="trailing" secondItem="fat-TI-8jn" secondAttribute="trailing" priority="750" constant="20" id="GPw-na-Z5B"/> <constraint firstItem="fat-TI-8jn" firstAttribute="centerX" secondItem="HlM-9Z-7gA" secondAttribute="centerX" id="Stt-gY-7Vh"/> <constraint firstAttribute="bottom" secondItem="fat-TI-8jn" secondAttribute="bottom" id="jvT-T4-Tex"/> </constraints> diff --git a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift index a0da40827e1819455c04bc348a6b2fd37cb1ccc8..5a071bec0ac4305a58e623721fdd706737128c44 100644 --- a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift +++ b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift @@ -57,6 +57,7 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase self.configureWalkrhroughNavigationBar() self.view.layoutIfNeeded() self.linkButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + linkButton.titleLabel?.ajustToTextSize() self.pinTextField.tintColor = UIColor.jamiSecondary self.passwordTextField.tintColor = UIColor.jamiSecondary diff --git a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard index ec6e8617889cd1afc62aa27e5b2c3c4cb190c7a2..32d5de14b381b37bdc889c0634553e696cdad22c 100644 --- a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="475-LA-El7"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="475-LA-El7"> <device id="retina3_5" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -179,8 +179,8 @@ <constraint firstAttribute="height" constant="800" id="BuH-dc-4uY"/> <constraint firstItem="cZa-pp-ILv" firstAttribute="centerX" secondItem="kQW-jH-EMh" secondAttribute="centerX" id="J9V-hd-HTu"/> <constraint firstItem="cZa-pp-ILv" firstAttribute="top" secondItem="kQW-jH-EMh" secondAttribute="top" id="Vg5-Be-bil"/> - <constraint firstItem="cZa-pp-ILv" firstAttribute="leading" secondItem="kQW-jH-EMh" secondAttribute="leading" priority="750" constant="40" id="mBs-Fq-N0u"/> - <constraint firstAttribute="trailing" secondItem="cZa-pp-ILv" secondAttribute="trailing" priority="750" constant="40" id="v3a-QY-a5x"/> + <constraint firstItem="cZa-pp-ILv" firstAttribute="leading" secondItem="kQW-jH-EMh" secondAttribute="leading" priority="750" constant="20" id="mBs-Fq-N0u"/> + <constraint firstAttribute="trailing" secondItem="cZa-pp-ILv" secondAttribute="trailing" priority="750" constant="20" id="v3a-QY-a5x"/> </constraints> </view> </subviews> diff --git a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift index a548d82bbe44c850fa1b1a79e6299636fe8a6435..43150441df7bab22040567a67538dade530c14af 100644 --- a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift +++ b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift @@ -47,6 +47,7 @@ var viewModel: LinkToAccountManagerViewModel! self.view.layoutIfNeeded() self.userNameTextField.becomeFirstResponder() self.signInButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + signInButton.titleLabel?.ajustToTextSize() configureWalkrhroughNavigationBar() self.adaptToKeyboardState(for: self.scrollView, with: self.disposeBag) keyboardDismissTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard)) diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard index dc69ff96901c7674a37615ba5f4070c605083717..0410e2bdf6daf25a01fcd992d3c08e804cdce5dc 100644 --- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ILs-xb-iKr"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ILs-xb-iKr"> <device id="ipad12_9rounded" orientation="portrait" layout="fullscreen" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -30,7 +30,7 @@ <constraint firstAttribute="width" constant="100" id="TaY-2a-CCG"/> </constraints> </imageView> - <label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Welcome to jami !" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E4b-Zv-unB"> + <label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Welcome to jami !" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E4b-Zv-unB"> <rect key="frame" x="383.5" y="221" width="257.5" height="43"/> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="36"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> @@ -39,7 +39,7 @@ <button opaque="NO" alpha="0.0" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bu0-90-MB5" customClass="DesignableButton" customModule="Ring" customModuleProvider="target"> <rect key="frame" x="362" y="304" width="300" height="50"/> <constraints> - <constraint firstAttribute="height" constant="50" id="FEf-kf-jCs"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="FEf-kf-jCs"/> </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/> <inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/> @@ -53,7 +53,7 @@ <button opaque="NO" alpha="0.0" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QLK-gs-fOJ" customClass="DesignableButton" customModule="Ring" customModuleProvider="target"> <rect key="frame" x="362" y="374" width="300" height="50"/> <constraints> - <constraint firstAttribute="height" constant="50" id="YW4-Sc-61P"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="YW4-Sc-61P"/> </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/> <inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/> @@ -68,8 +68,7 @@ <rect key="frame" x="362" y="444" width="300" height="50"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="300" id="dWY-2h-Jo8"/> - <constraint firstAttribute="width" relation="lessThanOrEqual" constant="500" id="xe5-20-YOQ"/> - <constraint firstAttribute="height" constant="50" id="xto-yX-yFM"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="xto-yX-yFM"/> </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/> <inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/> @@ -83,7 +82,7 @@ <button opaque="NO" alpha="0.0" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kHN-iS-Mdb" customClass="DesignableButton" customModule="Ring" customModuleProvider="target"> <rect key="frame" x="362" y="514" width="300" height="50"/> <constraints> - <constraint firstAttribute="height" constant="50" id="o1x-x5-0z2"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="o1x-x5-0z2"/> </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="22"/> <state key="normal" title="create Sip account"> @@ -97,6 +96,7 @@ <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <constraints> <constraint firstItem="E4b-Zv-unB" firstAttribute="centerX" secondItem="djg-zh-qNA" secondAttribute="centerX" id="2I1-0R-aRl"/> + <constraint firstItem="E4b-Zv-unB" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="djg-zh-qNA" secondAttribute="leading" constant="20" id="5VL-fW-ruk"/> <constraint firstItem="kHN-iS-Mdb" firstAttribute="leading" secondItem="bu0-90-MB5" secondAttribute="leading" id="7r4-TP-Df9"/> <constraint firstItem="Wd6-vQ-gaH" firstAttribute="trailing" secondItem="bu0-90-MB5" secondAttribute="trailing" id="9XM-f1-twm"/> <constraint firstItem="QLK-gs-fOJ" firstAttribute="top" secondItem="bu0-90-MB5" secondAttribute="bottom" constant="20" id="Edo-KX-6sz"/> @@ -104,6 +104,7 @@ <constraint firstItem="Wd6-vQ-gaH" firstAttribute="top" secondItem="QLK-gs-fOJ" secondAttribute="bottom" constant="20" id="Rpw-PU-14b"/> <constraint firstItem="kHN-iS-Mdb" firstAttribute="top" secondItem="Wd6-vQ-gaH" secondAttribute="bottom" constant="20" id="eKk-yN-Id4"/> <constraint firstItem="bu0-90-MB5" firstAttribute="centerX" secondItem="djg-zh-qNA" secondAttribute="centerX" id="fuH-3p-ssn"/> + <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="E4b-Zv-unB" secondAttribute="trailing" constant="20" id="kyK-k1-xsg"/> <constraint firstItem="QLK-gs-fOJ" firstAttribute="centerX" secondItem="djg-zh-qNA" secondAttribute="centerX" id="lwf-Rd-3hc"/> <constraint firstItem="QLK-gs-fOJ" firstAttribute="trailing" secondItem="bu0-90-MB5" secondAttribute="trailing" id="lzM-cm-1nj"/> <constraint firstItem="QLK-gs-fOJ" firstAttribute="leading" secondItem="bu0-90-MB5" secondAttribute="leading" id="mt4-7Z-eR3"/> @@ -135,8 +136,8 @@ <constraint firstItem="X8i-r8-BbF" firstAttribute="trailing" secondItem="hvJ-fJ-PMc" secondAttribute="trailing" id="InM-7Y-w4b"/> <constraint firstItem="X8i-r8-BbF" firstAttribute="leading" secondItem="hvJ-fJ-PMc" secondAttribute="leading" id="Mxh-zn-bSX"/> <constraint firstItem="X8i-r8-BbF" firstAttribute="bottom" secondItem="hvJ-fJ-PMc" secondAttribute="bottom" id="bnM-Bf-Zwh"/> - <constraint firstItem="hvJ-fJ-PMc" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="bu0-90-MB5" secondAttribute="trailing" constant="10" id="h6u-zb-Bvk"/> - <constraint firstItem="bu0-90-MB5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="hvJ-fJ-PMc" secondAttribute="leading" constant="10" id="pf3-7r-uP4"/> + <constraint firstItem="hvJ-fJ-PMc" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="bu0-90-MB5" secondAttribute="trailing" constant="20" id="h6u-zb-Bvk"/> + <constraint firstItem="bu0-90-MB5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="hvJ-fJ-PMc" secondAttribute="leading" constant="20" id="pf3-7r-uP4"/> </constraints> <viewLayoutGuide key="safeArea" id="hvJ-fJ-PMc"/> </view> diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift index fe0badf60d444324c24cdf0210a2c0f2468fd8ad..2b409ef1f8abe7997c2748f646abbef9bb706b29 100644 --- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift +++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift @@ -56,6 +56,10 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { self.createSipAccountButton.alpha = 1 self.connectToAccountManagerButton.alpha = 1 } + createAccountButton.titleLabel?.ajustToTextSize() + linkDeviceButton.titleLabel?.ajustToTextSize() + connectToAccountManagerButton.titleLabel?.ajustToTextSize() + createSipAccountButton.titleLabel?.ajustToTextSize() self.createAccountButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) self.linkDeviceButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) self.connectToAccountManagerButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) @@ -99,6 +103,13 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { view.backgroundColor = UIColor.jamiBackgroundColor self.welcomeTextLabel.textColor = UIColor.jamiLabelColor self.createSipAccountButton.setTitleColor(UIColor.jamiTextBlue, for: .normal) + NotificationCenter.default.rx + .notification(UIDevice.orientationDidChangeNotification) + .observeOn(MainScheduler.instance) + .subscribe(onNext: { [weak self] (_) in + self?.configureWalkrhroughNavigationBar() + self?.updateButtonsSize() + }).disposed(by: self.disposeBag) } func applyL10n() { @@ -127,6 +138,12 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { } } + func updateButtonsSize() { + self.createAccountButton.updateGradientFrame() + self.linkDeviceButton.updateGradientFrame() + self.connectToAccountManagerButton.updateGradientFrame() + self.view.layoutIfNeeded() + } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationController?.navigationBar.tintColor = UIColor.jamiSecondary @@ -134,6 +151,7 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) self.navigationController?.navigationBar.shadowImage = UIImage() self.navigationController?.navigationBar.isTranslucent = true + self.view.layoutIfNeeded() + updateButtonsSize() } - }