Storyboard 混乱:UITextView 和 UIView 不可见,UITextFields 不可编辑?
Storyboard confusion: UITextView and UIView not visible, UITextFields not editable?
我觉得我忽略了一些基本的东西。我已经布置了一个 UIViewController
如下。
我在 Interface Builder 中没有收到任何错误或警告,但是当我在模拟器中 运行 应用程序时,UITextView 和红色 UIView
没有出现。 (此外,UITextFields
不可编辑。)
我在 viewDidLoad:
的末尾放了几个 NSLog
,然后看到 UITextView
和 UIView
是我期望的位置:
2018-06-03 18:09:30.304537-0700 TestMe[37059:1239027] myTextView = {{48.5, 0}, {278, 60}}
2018-06-03 18:09:30.304876-0700 TestMe[37059:1239027] facebookView = {{52.5, 94.5}, {270, 80}}
它们根本不可见。为什么?
这里是main.storyboard:
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="Stack View standard spacing" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="TestMe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="efN-Uu-EM8">
<rect key="frame" x="0.0" y="40" width="375" height="587"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Why does this text field disappear and the view below it? I'm confused... very confused..." textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="uN2-2x-62N">
<rect key="frame" x="48.5" y="0.0" width="278" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="eD0-mv-hDl"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cQP-PE-x9G" userLabel="Facebook View">
<rect key="frame" x="52.5" y="94.5" width="270" height="80"/>
<color key="backgroundColor" red="1" green="0.1098039225" blue="0.14901961389999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="mff-q6-fMf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8I8-cQ-10b" userLabel="Separator View">
<rect key="frame" x="0.0" y="209" width="375" height="20"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t6G-KG-jL8" userLabel="Separator">
<rect key="frame" x="19" y="9" width="337.5" height="2"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="zlr-In-RmU"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" or " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6X-pf-iz5">
<rect key="frame" x="175" y="0.0" width="25" height="20.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2Nu-OR-NmV"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="VOL-QV-LjO"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="YK8-Pj-sW5"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="w7y-2K-QxP"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="yyh-r9-Dmx"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Odz-UD-YHc">
<rect key="frame" x="67.5" y="263.5" width="240" height="323.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="A2n-PC-13u" userLabel="Login View">
<rect key="frame" x="20" y="84" width="200" height="156"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="TMi-iY-XF2">
<rect key="frame" x="0.0" y="0.0" width="200" height="106"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="email" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="sq9-kJ-uel">
<rect key="frame" x="0.0" y="0.0" width="200" height="30"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="DDC-lb-W1o"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="email"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="new password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="jaX-Ys-zsJ">
<rect key="frame" x="0.0" y="38" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="retype password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Iki-yA-kWn">
<rect key="frame" x="0.0" y="76" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
</subviews>
<constraints>
<constraint firstItem="Iki-yA-kWn" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="TV0-Fc-Zy6"/>
<constraint firstItem="jaX-Ys-zsJ" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="ueB-9T-rcU"/>
</constraints>
</stackView>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" verticalCompressionResistancePriority="748" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bkQ-lZ-TGN">
<rect key="frame" x="0.0" y="126" width="200" height="30"/>
<color key="backgroundColor" red="0.89275385269999996" green="0.94806676079999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Create account"/>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerX" secondItem="Odz-UD-YHc" secondAttribute="centerX" id="ECO-de-jMM"/>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerY" secondItem="Odz-UD-YHc" secondAttribute="centerY" id="uBG-6V-L4T"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="8I8-cQ-10b" secondAttribute="trailing" id="LOw-Vq-fCr"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" id="dxM-bE-lPs"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Odz-UD-YHc" firstAttribute="height" secondItem="6Tk-OE-BBY" secondAttribute="height" multiplier="0.5" id="1Cl-gZ-RGu"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="efN-Uu-EM8" secondAttribute="bottom" constant="40" id="2f9-c8-EJL"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="efN-Uu-EM8" secondAttribute="trailing" id="7qG-T5-VCR"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="width" secondItem="6Tk-OE-BBY" secondAttribute="width" multiplier="0.9" id="9M3-cG-Ldp"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="40" id="PaP-tg-Ne3"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="VXh-b8-3ay"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="facebookView" destination="cQP-PE-x9G" id="LXX-lM-1tn"/>
<outlet property="myTextView" destination="uN2-2x-62N" id="coF-vZ-FrJ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
我 运行宁 Xcode 9.4 (9F1027a)。非常感谢任何帮助。
在创建了一个与您的视图层次结构相似的示例后,我意识到由于您的文本视图和红色背景视图缺少宽度约束,因此它们在运行时的宽度为零。尝试为它们提供与父级堆栈视图相同的宽度,它们将被渲染。
此外,在使用垂直堆栈视图时,为子视图提供高度约束不是一个好主意,因为堆栈视图本身会为呈现其子视图创建一些约束,这可能会导致运行时约束冲突。有关详细信息,请参阅此 link。
您没有在每个视图上适当地设置 top-bottom-leading-trailing-width-height 约束,因此编译中的位置是错误的,文本字段也因此不可编辑。
看看你我编辑的代码可能更容易理解
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="efN-Uu-EM8">
<rect key="frame" x="0.0" y="40" width="375" height="587"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Why does this text field disappear and the view below it? I'm confused... very confused..." textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="uN2-2x-62N">
<rect key="frame" x="48.5" y="0.0" width="278" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="eD0-mv-hDl"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cQP-PE-x9G" userLabel="Facebook View">
<rect key="frame" x="52.5" y="107" width="270" height="80"/>
<color key="backgroundColor" red="1" green="0.1098039225" blue="0.14901961389999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="mff-q6-fMf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8I8-cQ-10b" userLabel="Separator View">
<rect key="frame" x="0.0" y="234" width="375" height="20"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t6G-KG-jL8" userLabel="Separator">
<rect key="frame" x="19" y="9" width="338" height="2"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="zlr-In-RmU"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" or " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6X-pf-iz5">
<rect key="frame" x="175" y="0.5" width="25" height="20.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2Nu-OR-NmV"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="leading" secondItem="8I8-cQ-10b" secondAttribute="leading" constant="19" id="KmU-LN-V4W"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="VOL-QV-LjO"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="YK8-Pj-sW5"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="w7y-2K-QxP"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="yyh-r9-Dmx"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Odz-UD-YHc">
<rect key="frame" x="67.5" y="301" width="240" height="286"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="A2n-PC-13u" userLabel="Login View">
<rect key="frame" x="20" y="65.5" width="200" height="156"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="TMi-iY-XF2">
<rect key="frame" x="0.0" y="0.0" width="200" height="106"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="email" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="sq9-kJ-uel">
<rect key="frame" x="0.0" y="0.0" width="200" height="30"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="DDC-lb-W1o"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="email"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="new password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="jaX-Ys-zsJ">
<rect key="frame" x="0.0" y="38" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="retype password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Iki-yA-kWn">
<rect key="frame" x="0.0" y="76" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
</subviews>
<constraints>
<constraint firstItem="Iki-yA-kWn" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="TV0-Fc-Zy6"/>
<constraint firstItem="jaX-Ys-zsJ" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="ueB-9T-rcU"/>
</constraints>
</stackView>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" verticalCompressionResistancePriority="748" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bkQ-lZ-TGN">
<rect key="frame" x="0.0" y="126" width="200" height="30"/>
<color key="backgroundColor" red="0.89275385269999996" green="0.94806676079999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Create account"/>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerX" secondItem="Odz-UD-YHc" secondAttribute="centerX" id="ECO-de-jMM"/>
<constraint firstAttribute="height" constant="286" id="rbx-xl-vgb"/>
<constraint firstAttribute="width" constant="240" id="spR-bu-Zx0"/>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerY" secondItem="Odz-UD-YHc" secondAttribute="centerY" id="uBG-6V-L4T"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="8I8-cQ-10b" firstAttribute="top" secondItem="cQP-PE-x9G" secondAttribute="bottom" constant="47" id="6eh-Ds-57M"/>
<constraint firstAttribute="trailing" secondItem="uN2-2x-62N" secondAttribute="trailing" constant="48.5" id="7rd-h4-aIp"/>
<constraint firstItem="cQP-PE-x9G" firstAttribute="top" secondItem="uN2-2x-62N" secondAttribute="bottom" constant="47" id="8gW-mV-6tW"/>
<constraint firstAttribute="trailing" secondItem="8I8-cQ-10b" secondAttribute="trailing" id="LOw-Vq-fCr"/>
<constraint firstItem="uN2-2x-62N" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" constant="48.5" id="Ot8-hl-xJo"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="centerY" secondItem="efN-Uu-EM8" secondAttribute="centerY" constant="-50" id="P1h-Js-zjz"/>
<constraint firstAttribute="bottom" secondItem="Odz-UD-YHc" secondAttribute="bottom" id="QT0-FI-0JI"/>
<constraint firstItem="Odz-UD-YHc" firstAttribute="top" secondItem="8I8-cQ-10b" secondAttribute="bottom" constant="47" id="SsW-FE-H6c"/>
<constraint firstItem="cQP-PE-x9G" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" constant="52.5" id="coV-Rh-6jK"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" id="dxM-bE-lPs"/>
<constraint firstAttribute="trailing" secondItem="cQP-PE-x9G" secondAttribute="trailing" constant="52.5" id="fIf-qS-rMG"/>
<constraint firstItem="uN2-2x-62N" firstAttribute="top" secondItem="efN-Uu-EM8" secondAttribute="top" id="nYZ-5b-P9P"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="efN-Uu-EM8" secondAttribute="bottom" constant="40" id="2f9-c8-EJL"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="efN-Uu-EM8" secondAttribute="trailing" id="7qG-T5-VCR"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="40" id="PaP-tg-Ne3"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="VXh-b8-3ay"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
希望对您有所帮助。
我觉得我忽略了一些基本的东西。我已经布置了一个 UIViewController
如下。
我在 Interface Builder 中没有收到任何错误或警告,但是当我在模拟器中 运行 应用程序时,UITextView 和红色 UIView
没有出现。 (此外,UITextFields
不可编辑。)
我在 viewDidLoad:
的末尾放了几个 NSLog
,然后看到 UITextView
和 UIView
是我期望的位置:
2018-06-03 18:09:30.304537-0700 TestMe[37059:1239027] myTextView = {{48.5, 0}, {278, 60}}
2018-06-03 18:09:30.304876-0700 TestMe[37059:1239027] facebookView = {{52.5, 94.5}, {270, 80}}
它们根本不可见。为什么?
这里是main.storyboard:
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="Stack View standard spacing" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="TestMe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="efN-Uu-EM8">
<rect key="frame" x="0.0" y="40" width="375" height="587"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Why does this text field disappear and the view below it? I'm confused... very confused..." textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="uN2-2x-62N">
<rect key="frame" x="48.5" y="0.0" width="278" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="eD0-mv-hDl"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cQP-PE-x9G" userLabel="Facebook View">
<rect key="frame" x="52.5" y="94.5" width="270" height="80"/>
<color key="backgroundColor" red="1" green="0.1098039225" blue="0.14901961389999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="mff-q6-fMf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8I8-cQ-10b" userLabel="Separator View">
<rect key="frame" x="0.0" y="209" width="375" height="20"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t6G-KG-jL8" userLabel="Separator">
<rect key="frame" x="19" y="9" width="337.5" height="2"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="zlr-In-RmU"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" or " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6X-pf-iz5">
<rect key="frame" x="175" y="0.0" width="25" height="20.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2Nu-OR-NmV"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="VOL-QV-LjO"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="YK8-Pj-sW5"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="w7y-2K-QxP"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="yyh-r9-Dmx"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Odz-UD-YHc">
<rect key="frame" x="67.5" y="263.5" width="240" height="323.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="A2n-PC-13u" userLabel="Login View">
<rect key="frame" x="20" y="84" width="200" height="156"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="TMi-iY-XF2">
<rect key="frame" x="0.0" y="0.0" width="200" height="106"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="email" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="sq9-kJ-uel">
<rect key="frame" x="0.0" y="0.0" width="200" height="30"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="DDC-lb-W1o"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="email"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="new password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="jaX-Ys-zsJ">
<rect key="frame" x="0.0" y="38" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="retype password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Iki-yA-kWn">
<rect key="frame" x="0.0" y="76" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
</subviews>
<constraints>
<constraint firstItem="Iki-yA-kWn" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="TV0-Fc-Zy6"/>
<constraint firstItem="jaX-Ys-zsJ" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="ueB-9T-rcU"/>
</constraints>
</stackView>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" verticalCompressionResistancePriority="748" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bkQ-lZ-TGN">
<rect key="frame" x="0.0" y="126" width="200" height="30"/>
<color key="backgroundColor" red="0.89275385269999996" green="0.94806676079999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Create account"/>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerX" secondItem="Odz-UD-YHc" secondAttribute="centerX" id="ECO-de-jMM"/>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerY" secondItem="Odz-UD-YHc" secondAttribute="centerY" id="uBG-6V-L4T"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="8I8-cQ-10b" secondAttribute="trailing" id="LOw-Vq-fCr"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" id="dxM-bE-lPs"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Odz-UD-YHc" firstAttribute="height" secondItem="6Tk-OE-BBY" secondAttribute="height" multiplier="0.5" id="1Cl-gZ-RGu"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="efN-Uu-EM8" secondAttribute="bottom" constant="40" id="2f9-c8-EJL"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="efN-Uu-EM8" secondAttribute="trailing" id="7qG-T5-VCR"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="width" secondItem="6Tk-OE-BBY" secondAttribute="width" multiplier="0.9" id="9M3-cG-Ldp"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="40" id="PaP-tg-Ne3"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="VXh-b8-3ay"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="facebookView" destination="cQP-PE-x9G" id="LXX-lM-1tn"/>
<outlet property="myTextView" destination="uN2-2x-62N" id="coF-vZ-FrJ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
我 运行宁 Xcode 9.4 (9F1027a)。非常感谢任何帮助。
在创建了一个与您的视图层次结构相似的示例后,我意识到由于您的文本视图和红色背景视图缺少宽度约束,因此它们在运行时的宽度为零。尝试为它们提供与父级堆栈视图相同的宽度,它们将被渲染。
此外,在使用垂直堆栈视图时,为子视图提供高度约束不是一个好主意,因为堆栈视图本身会为呈现其子视图创建一些约束,这可能会导致运行时约束冲突。有关详细信息,请参阅此 link。
您没有在每个视图上适当地设置 top-bottom-leading-trailing-width-height 约束,因此编译中的位置是错误的,文本字段也因此不可编辑。
看看你我编辑的代码可能更容易理解
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="login" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="efN-Uu-EM8">
<rect key="frame" x="0.0" y="40" width="375" height="587"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Why does this text field disappear and the view below it? I'm confused... very confused..." textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="uN2-2x-62N">
<rect key="frame" x="48.5" y="0.0" width="278" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="eD0-mv-hDl"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cQP-PE-x9G" userLabel="Facebook View">
<rect key="frame" x="52.5" y="107" width="270" height="80"/>
<color key="backgroundColor" red="1" green="0.1098039225" blue="0.14901961389999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="mff-q6-fMf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8I8-cQ-10b" userLabel="Separator View">
<rect key="frame" x="0.0" y="234" width="375" height="20"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t6G-KG-jL8" userLabel="Separator">
<rect key="frame" x="19" y="9" width="338" height="2"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="zlr-In-RmU"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" or " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6X-pf-iz5">
<rect key="frame" x="175" y="0.5" width="25" height="20.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2Nu-OR-NmV"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="leading" secondItem="8I8-cQ-10b" secondAttribute="leading" constant="19" id="KmU-LN-V4W"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="VOL-QV-LjO"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="YK8-Pj-sW5"/>
<constraint firstItem="t6G-KG-jL8" firstAttribute="centerX" secondItem="8I8-cQ-10b" secondAttribute="centerX" id="w7y-2K-QxP"/>
<constraint firstItem="M6X-pf-iz5" firstAttribute="centerY" secondItem="8I8-cQ-10b" secondAttribute="centerY" id="yyh-r9-Dmx"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Odz-UD-YHc">
<rect key="frame" x="67.5" y="301" width="240" height="286"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="A2n-PC-13u" userLabel="Login View">
<rect key="frame" x="20" y="65.5" width="200" height="156"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="TMi-iY-XF2">
<rect key="frame" x="0.0" y="0.0" width="200" height="106"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="email" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="sq9-kJ-uel">
<rect key="frame" x="0.0" y="0.0" width="200" height="30"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="DDC-lb-W1o"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="email"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="new password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="jaX-Ys-zsJ">
<rect key="frame" x="0.0" y="38" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="retype password" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Iki-yA-kWn">
<rect key="frame" x="0.0" y="76" width="200" height="30"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" textContentType="password"/>
</textField>
</subviews>
<constraints>
<constraint firstItem="Iki-yA-kWn" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="TV0-Fc-Zy6"/>
<constraint firstItem="jaX-Ys-zsJ" firstAttribute="width" secondItem="sq9-kJ-uel" secondAttribute="width" id="ueB-9T-rcU"/>
</constraints>
</stackView>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" verticalCompressionResistancePriority="748" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bkQ-lZ-TGN">
<rect key="frame" x="0.0" y="126" width="200" height="30"/>
<color key="backgroundColor" red="0.89275385269999996" green="0.94806676079999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Create account"/>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerX" secondItem="Odz-UD-YHc" secondAttribute="centerX" id="ECO-de-jMM"/>
<constraint firstAttribute="height" constant="286" id="rbx-xl-vgb"/>
<constraint firstAttribute="width" constant="240" id="spR-bu-Zx0"/>
<constraint firstItem="A2n-PC-13u" firstAttribute="centerY" secondItem="Odz-UD-YHc" secondAttribute="centerY" id="uBG-6V-L4T"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="8I8-cQ-10b" firstAttribute="top" secondItem="cQP-PE-x9G" secondAttribute="bottom" constant="47" id="6eh-Ds-57M"/>
<constraint firstAttribute="trailing" secondItem="uN2-2x-62N" secondAttribute="trailing" constant="48.5" id="7rd-h4-aIp"/>
<constraint firstItem="cQP-PE-x9G" firstAttribute="top" secondItem="uN2-2x-62N" secondAttribute="bottom" constant="47" id="8gW-mV-6tW"/>
<constraint firstAttribute="trailing" secondItem="8I8-cQ-10b" secondAttribute="trailing" id="LOw-Vq-fCr"/>
<constraint firstItem="uN2-2x-62N" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" constant="48.5" id="Ot8-hl-xJo"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="centerY" secondItem="efN-Uu-EM8" secondAttribute="centerY" constant="-50" id="P1h-Js-zjz"/>
<constraint firstAttribute="bottom" secondItem="Odz-UD-YHc" secondAttribute="bottom" id="QT0-FI-0JI"/>
<constraint firstItem="Odz-UD-YHc" firstAttribute="top" secondItem="8I8-cQ-10b" secondAttribute="bottom" constant="47" id="SsW-FE-H6c"/>
<constraint firstItem="cQP-PE-x9G" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" constant="52.5" id="coV-Rh-6jK"/>
<constraint firstItem="8I8-cQ-10b" firstAttribute="leading" secondItem="efN-Uu-EM8" secondAttribute="leading" id="dxM-bE-lPs"/>
<constraint firstAttribute="trailing" secondItem="cQP-PE-x9G" secondAttribute="trailing" constant="52.5" id="fIf-qS-rMG"/>
<constraint firstItem="uN2-2x-62N" firstAttribute="top" secondItem="efN-Uu-EM8" secondAttribute="top" id="nYZ-5b-P9P"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="efN-Uu-EM8" secondAttribute="bottom" constant="40" id="2f9-c8-EJL"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="efN-Uu-EM8" secondAttribute="trailing" id="7qG-T5-VCR"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="40" id="PaP-tg-Ne3"/>
<constraint firstItem="efN-Uu-EM8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="VXh-b8-3ay"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>