swift4:我场景中的所有文本字段均不可编辑

时间:2019-04-29 13:16:18

标签: swift storyboard uitextfield scene

我的情节提要中有一个场景,该场景的所有字段在应用程序运行时均不可编辑。

注意。我已经检查了所有文本字段及其所有父级userInteractionEnabledtrue并由于这个问题(My TextField is not editable),但确实做到了没有帮助。我还有其他类似的场景可以在不使用任何委托人或其他东西的情况下工作,并且它们的文本字段仍可编辑。

我确实注释掉了其相关视图控制器中的所有内容,但是并没有改变这种情况。 我将其XML代码带到这里供您参考,也许您可​​以找到导致这种情况的任何信息。

我对“场景”所做的更改是:将所有项目放置在StackView内的嵌套视图中,如果存在约束,则将其+从Swift3迁移到Swift4。

<viewController storyboardIdentifier="CreateNewAddressViewController" id="meF-fr-sNf" customClass="CreateNewAddressViewController" customModule="nopStation" customModuleProvider="target" sceneMemberID="viewController">
    <view key="view" contentMode="scaleToFill" id="AwK-Dk-u5T">
        <rect key="frame" x="0.0" y="0.0" width="375" height="800"/>
        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
        <subviews>
            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FhN-qH-KZv">
                <rect key="frame" x="10" y="84" width="355" height="646"/>
                <subviews>
                    <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="goD-MV-xj2">
                        <rect key="frame" x="0.0" y="0.0" width="355" height="590"/>
                        <subviews>
                            <stackView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="o9G-FL-lqF">
                                <rect key="frame" x="10" y="0.0" width="335" height="290"/>
                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                <subviews>
                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WMA-Km-72c">
                                        <rect key="frame" x="0.0" y="0.0" width="335" height="40"/>
                                        <subviews>
                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="First Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fKn-8z-Pzc">
                                                <rect key="frame" x="0.0" y="0.0" width="316.5" height="40"/>
                                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                <textInputTraits key="textInputTraits"/>
                                            </textField>
                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fUe-Bq-W8T">
                                                <rect key="frame" x="326.5" y="9.5" width="8.5" height="21.5"/>
                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                                <color key="textColor" name="RequiredFieldColor"/>
                                                <nil key="highlightedColor"/>
                                            </label>
                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dMl-Cd-fC6">
                                                <rect key="frame" x="0.0" y="38" width="335" height="2"/>
                                                <color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                <constraints>
                                                    <constraint firstAttribute="height" constant="2" id="Yrr-ai-qmM"/>
                                                </constraints>
                                            </view>
                                        </subviews>
                                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                        <constraints>
                                            <constraint firstItem="dMl-Cd-fC6" firstAttribute="leading" secondItem="WMA-Km-72c" secondAttribute="leading" id="4z7-jV-IUk"/>
                                            <constraint firstAttribute="bottom" secondItem="dMl-Cd-fC6" secondAttribute="bottom" id="F8F-RI-rg4"/>
                                            <constraint firstItem="fUe-Bq-W8T" firstAttribute="centerY" secondItem="WMA-Km-72c" secondAttribute="centerY" id="I89-Go-X44"/>
                                            <constraint firstAttribute="bottom" secondItem="fKn-8z-Pzc" secondAttribute="bottom" id="JTN-Ml-5Eo"/>
                                            <constraint firstItem="fUe-Bq-W8T" firstAttribute="leading" secondItem="fKn-8z-Pzc" secondAttribute="trailing" constant="10" id="RcN-3E-CP8"/>
                                            <constraint firstAttribute="trailing" secondItem="dMl-Cd-fC6" secondAttribute="trailing" id="X8s-r3-rol"/>
                                            <constraint firstItem="fKn-8z-Pzc" firstAttribute="top" secondItem="WMA-Km-72c" secondAttribute="top" id="bek-aj-mKk"/>
                                            <constraint firstItem="fKn-8z-Pzc" firstAttribute="leading" secondItem="WMA-Km-72c" secondAttribute="leading" id="ghL-fb-IFL"/>
                                            <constraint firstAttribute="trailing" secondItem="fUe-Bq-W8T" secondAttribute="trailing" id="tmI-VS-dyA"/>
                                            <constraint firstAttribute="height" constant="40" id="xLm-i2-YEp"/>
                                        </constraints>
                                    </view>
                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P0X-pA-gjs">
                                        <rect key="frame" x="0.0" y="50" width="335" height="40"/>
                                        <subviews>
                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Last Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DfQ-XX-xII">
                                                <rect key="frame" x="0.0" y="0.0" width="316.5" height="40"/>
                                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                <textInputTraits key="textInputTraits"/>
                                            </textField>
                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7TX-E6-XLu">
                                                <rect key="frame" x="326.5" y="9.5" width="8.5" height="21.5"/>
                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                                <color key="textColor" name="RequiredFieldColor"/>
                                                <nil key="highlightedColor"/>
                                            </label>
                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5hQ-6V-Wq0">
                                                <rect key="frame" x="0.0" y="38" width="335" height="2"/>
                                                <color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                <constraints>
                                                    <constraint firstAttribute="height" constant="2" id="FNO-9t-n52"/>
                                                </constraints>
                                            </view>
                                        </subviews>
                                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                        <constraints>
                                            <constraint firstItem="DfQ-XX-xII" firstAttribute="top" secondItem="P0X-pA-gjs" secondAttribute="top" id="0g2-tp-rW4"/>
                                            <constraint firstAttribute="trailing" secondItem="5hQ-6V-Wq0" secondAttribute="trailing" id="8eK-Vx-f2y"/>
                                            <constraint firstAttribute="bottom" secondItem="5hQ-6V-Wq0" secondAttribute="bottom" id="Fiu-Kw-SJQ"/>
                                            <constraint firstAttribute="bottom" secondItem="DfQ-XX-xII" secondAttribute="bottom" id="LqW-0G-dQv"/>
                                            <constraint firstItem="5hQ-6V-Wq0" firstAttribute="leading" secondItem="P0X-pA-gjs" secondAttribute="leading" id="RAi-YU-lOk"/>
                                            <constraint firstItem="DfQ-XX-xII" firstAttribute="leading" secondItem="P0X-pA-gjs" secondAttribute="leading" id="hQA-Cy-Icv"/>
                                            <constraint firstAttribute="height" constant="40" id="jpn-Ph-BBz"/>
                                            <constraint firstItem="7TX-E6-XLu" firstAttribute="centerY" secondItem="P0X-pA-gjs" secondAttribute="centerY" id="kXU-Bp-hcH"/>
                                            <constraint firstAttribute="trailing" secondItem="7TX-E6-XLu" secondAttribute="trailing" id="wc4-6s-KgF"/>
                                            <constraint firstItem="7TX-E6-XLu" firstAttribute="leading" secondItem="DfQ-XX-xII" secondAttribute="trailing" constant="10" id="zHs-Pr-2vS"/>
                                        </constraints>
                                    </view>
                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Nnr-ax-dhk">
                                        <rect key="frame" x="0.0" y="100" width="335" height="40"/>
                                        <subviews>
                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Email" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BhZ-fY-4k7">
                                                <rect key="frame" x="0.0" y="0.0" width="316.5" height="40"/>
                                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                <textInputTraits key="textInputTraits"/>
                                            </textField>
                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j0N-ZY-V0Y">
                                                <rect key="frame" x="326.5" y="9.5" width="8.5" height="21.5"/>
                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                                <color key="textColor" name="RequiredFieldColor"/>
                                                <nil key="highlightedColor"/>
                                            </label>
                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nTG-O0-l4y">
                                                <rect key="frame" x="0.0" y="38" width="335" height="2"/>
                                                <color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                <constraints>
                                                    <constraint firstAttribute="height" constant="2" id="u9W-Yq-hih"/>
                                                </constraints>
                                            </view>
                                        </subviews>
                                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                        <constraints>
                                            <constraint firstItem="BhZ-fY-4k7" firstAttribute="leading" secondItem="Nnr-ax-dhk" secondAttribute="leading" id="3hK-ug-6Ys"/>
                                            <constraint firstAttribute="trailing" secondItem="nTG-O0-l4y" secondAttribute="trailing" id="54C-vF-p3i"/>
                                            <constraint firstAttribute="bottom" secondItem="nTG-O0-l4y" secondAttribute="bottom" id="7ef-y6-enL"/>
                                            <constraint firstAttribute="trailing" secondItem="j0N-ZY-V0Y" secondAttribute="trailing" id="B5b-XV-RYP"/>
                                            <constraint firstItem="j0N-ZY-V0Y" firstAttribute="centerY" secondItem="Nnr-ax-dhk" secondAttribute="centerY" id="BUL-N2-cNw"/>
                                            <constraint firstItem="nTG-O0-l4y" firstAttribute="leading" secondItem="Nnr-ax-dhk" secondAttribute="leading" id="Nib-ZA-Ihq"/>
                                            <constraint firstItem="BhZ-fY-4k7" firstAttribute="top" secondItem="Nnr-ax-dhk" secondAttribute="top" id="Rey-qG-CSa"/>
                                            <constraint firstItem="j0N-ZY-V0Y" firstAttribute="leading" secondItem="BhZ-fY-4k7" secondAttribute="trailing" constant="10" id="dx4-BK-uWj"/>
                                            <constraint firstAttribute="bottom" secondItem="BhZ-fY-4k7" secondAttribute="bottom" id="p5m-SO-CZ7"/>
                                            <constraint firstAttribute="height" constant="40" id="wBB-11-ud1"/>
                                        </constraints>
                                    </view>
                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m6n-mP-IDR">
                                        <rect key="frame" x="0.0" y="150" width="335" height="40"/>
                                        <subviews>
                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Address 1" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="9Xe-87-5pU">
                                                <rect key="frame" x="0.0" y="0.0" width="316.5" height="38"/>
                                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                <textInputTraits key="textInputTraits"/>
                                            </textField>
                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cLO-wm-dKq">
                                                <rect key="frame" x="326.5" y="9.5" width="8.5" height="21.5"/>
                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                                <color key="textColor" name="RequiredFieldColor"/>
                                                <nil key="highlightedColor"/>
                                            </label>
                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0v1-IU-zJP">
                                                <rect key="frame" x="0.0" y="38" width="335" height="2"/>
                                                <color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                <constraints>
                                                    <constraint firstAttribute="height" constant="2" id="xj6-r6-dVL"/>
                                                </constraints>
                                            </view>
                                        </subviews>
                                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                        <constraints>
                                            <constraint firstAttribute="trailing" secondItem="0v1-IU-zJP" secondAttribute="trailing" id="7ol-EC-Z7f"/>
                                            <constraint firstItem="0v1-IU-zJP" firstAttribute="top" secondItem="9Xe-87-5pU" secondAttribute="bottom" id="9Kh-vz-aHF"/>
                                            <constraint firstItem="cLO-wm-dKq" firstAttribute="leading" secondItem="9Xe-87-5pU" secondAttribute="trailing" constant="10" id="BzA-q4-AUa"/>
                                            <constraint firstItem="cLO-wm-dKq" firstAttribute="centerY" secondItem="m6n-mP-IDR" secondAttribute="centerY" id="DLF-Sg-4fb"/>
                                            <constraint firstAttribute="trailing" secondItem="cLO-wm-dKq" secondAttribute="trailing" id="Ddh-gm-hyM"/>
                                            <constraint firstItem="9Xe-87-5pU" firstAttribute="top" secondItem="m6n-mP-IDR" secondAttribute="top" id="V6F-fl-0nK"/>
                                            <constraint firstItem="0v1-IU-zJP" firstAttribute="leading" secondItem="m6n-mP-IDR" secondAttribute="leading" id="cly-NY-H6S"/>
                                            <constraint firstItem="9Xe-87-5pU" firstAttribute="leading" secondItem="m6n-mP-IDR" secondAttribute="leading" id="mCt-JT-svl"/>
                                            <constraint firstAttribute="height" constant="40" id="sGm-DQ-Zyt"/>
                                            <constraint firstAttribute="bottom" secondItem="0v1-IU-zJP" secondAttribute="bottom" id="uXh-8G-dAn"/>
                                        </constraints>
                                    </view>

                                        <rect key="frame" x="0.0" y="250" width="335" height="40"/>
                                        <subviews>
                                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Phone Number" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ykM-gm-kv4">
                                                <rect key="frame" x="0.0" y="0.0" width="316.5" height="40"/>
                                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                <textInputTraits key="textInputTraits"/>
                                            </textField>
                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l86-0I-WbN">
                                                <rect key="frame" x="326.5" y="9.5" width="8.5" height="21.5"/>
                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                                <color key="textColor" name="RequiredFieldColor"/>
                                                <nil key="highlightedColor"/>
                                            </label>
                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b1z-D7-bNt">
                                                <rect key="frame" x="0.0" y="38" width="335" height="2"/>
                                                <color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                <constraints>
                                                    <constraint firstAttribute="height" constant="2" id="4ev-LH-vny"/>
                                                </constraints>
                                            </view>
                                        </subviews>
                                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                        <constraints>
                                            <constraint firstItem="l86-0I-WbN" firstAttribute="leading" secondItem="ykM-gm-kv4" secondAttribute="trailing" constant="10" id="6qg-ch-5Kj"/>
                                            <constraint firstItem="ykM-gm-kv4" firstAttribute="top" secondItem="FsO-iO-UA3" secondAttribute="top" id="81o-ef-AGF"/>
                                            <constraint firstAttribute="height" constant="40" id="9mW-zj-58j"/>
                                            <constraint firstItem="ykM-gm-kv4" firstAttribute="centerY" secondItem="FsO-iO-UA3" secondAttribute="centerY" id="Amc-P7-79p"/>
                                            <constraint firstAttribute="bottom" secondItem="b1z-D7-bNt" secondAttribute="bottom" id="HBK-sg-EAD"/>
                                            <constraint firstItem="ykM-gm-kv4" firstAttribute="leading" secondItem="FsO-iO-UA3" secondAttribute="leading" id="RcY-bk-6yR"/>
                                            <constraint firstAttribute="trailing" secondItem="b1z-D7-bNt" secondAttribute="trailing" id="W2P-F3-Hlg"/>
                                            <constraint firstAttribute="trailing" secondItem="l86-0I-WbN" secondAttribute="trailing" id="efh-fE-eln"/>
                                            <constraint firstItem="l86-0I-WbN" firstAttribute="centerY" secondItem="FsO-iO-UA3" secondAttribute="centerY" id="hgs-xM-U20"/>
                                            <constraint firstItem="b1z-D7-bNt" firstAttribute="leading" secondItem="FsO-iO-UA3" secondAttribute="leading" id="qLG-Sc-NEU"/>
                                            <constraint firstAttribute="bottom" secondItem="ykM-gm-kv4" secondAttribute="bottom" id="yg9-Kg-K83"/>
                                        </constraints>
                                    </view>
                                </subviews>
                            </stackView>
                        </subviews>
                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                    </view>
                </subviews>
                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                <constraints>
                    <constraint firstAttribute="trailing" secondItem="goD-MV-xj2" secondAttribute="trailing" id="Dak-14-pgV"/>
                    <constraint firstAttribute="bottom" secondItem="goD-MV-xj2" secondAttribute="bottom" id="Eve-uT-c8i"/>
                    <constraint firstItem="goD-MV-xj2" firstAttribute="leading" secondItem="FhN-qH-KZv" secondAttribute="leading" id="HWd-e0-G4Q"/>
                    <constraint firstItem="goD-MV-xj2" firstAttribute="top" secondItem="FhN-qH-KZv" secondAttribute="top" id="ln7-n8-Afi"/>
                </constraints>
                <userDefinedRuntimeAttributes>
                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
                        <integer key="value" value="4"/>
                    </userDefinedRuntimeAttribute>
                </userDefinedRuntimeAttributes>
            </scrollView>
            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4cS-bG-FbJ">
                <rect key="frame" x="10" y="734" width="355" height="40"/>
                <color key="backgroundColor" name="AccentColor"/>
                <constraints>
                    <constraint firstAttribute="height" constant="40" id="MoG-YS-fiL"/>
                </constraints>
                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
                <state key="normal" title="SAVE">
                    <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                </state>
                <userDefinedRuntimeAttributes>
                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
                        <integer key="value" value="4"/>
                    </userDefinedRuntimeAttribute>
                </userDefinedRuntimeAttributes>
                <connections>
                    <action selector="saveBtnAct:" destination="meF-fr-sNf" eventType="touchUpInside" id="3cT-XX-k4z"/>
                </connections>
            </button>
        </subviews>
        <color key="backgroundColor" red="0.8862745098" green="0.8862745098" blue="0.8862745098" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        <constraints>
            <constraint firstItem="gQb-mV-QRj" firstAttribute="trailing" secondItem="FhN-qH-KZv" secondAttribute="trailing" constant="10" id="Ke5-D5-K26"/>
            <constraint firstItem="4cS-bG-FbJ" firstAttribute="leading" secondItem="gQb-mV-QRj" secondAttribute="leading" constant="10" id="Tk0-nE-xox"/>
            <constraint firstItem="gQb-mV-QRj" firstAttribute="bottom" secondItem="4cS-bG-FbJ" secondAttribute="bottom" constant="26" id="Zor-Jg-W1u"/>
            <constraint firstItem="4cS-bG-FbJ" firstAttribute="top" secondItem="FhN-qH-KZv" secondAttribute="bottom" constant="4" id="clQ-NQ-TBp"/>
            <constraint firstItem="goD-MV-xj2" firstAttribute="width" secondItem="AwK-Dk-u5T" secondAttribute="width" constant="-20" id="h9X-0l-yIk"/>
            <constraint firstItem="FhN-qH-KZv" firstAttribute="top" secondItem="gQb-mV-QRj" secondAttribute="top" constant="64" id="i2a-Mw-TF0"/>
            <constraint firstItem="FhN-qH-KZv" firstAttribute="leading" secondItem="gQb-mV-QRj" secondAttribute="leading" constant="10" id="qEg-VO-wiQ"/>
            <constraint firstItem="gQb-mV-QRj" firstAttribute="trailing" secondItem="4cS-bG-FbJ" secondAttribute="trailing" constant="10" id="u44-kZ-irC"/>
        </constraints>
        <viewLayoutGuide key="safeArea" id="gQb-mV-QRj"/>
    </view>
    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
    <size key="freeformSize" width="375" height="800"/>
    <connections>
        <outlet property="address1RequiredLabel" destination="cLO-wm-dKq" id="4ze-PL-To9"/>
        <outlet property="address1TextField" destination="9Xe-87-5pU" id="uMF-aw-PQZ"/>
        <outlet property="address2RequiredLabel" destination="Bnx-Sa-95p" id="882-gU-i1B"/>
        <outlet property="address2TextField" destination="zB0-7l-zSy" id="OCL-Wg-V3e"/>
        <outlet property="containerScrollView" destination="FhN-qH-KZv" id="Qgr-4M-3ah"/>
        <outlet property="emailRequiredLabel" destination="j0N-ZY-V0Y" id="H2q-yS-KW4"/>
        <outlet property="emailTextField" destination="BhZ-fY-4k7" id="ctw-kQ-7hc"/>
        <outlet property="firstNameRequiredLabel" destination="fUe-Bq-W8T" id="Pp0-BF-EIE"/>
        <outlet property="firstNameTextField" destination="fKn-8z-Pzc" id="CgT-Uw-Ixy"/>
        <outlet property="lastNameRequiredLabel" destination="7TX-E6-XLu" id="gap-4c-FWJ"/>
        <outlet property="lastNameTextField" destination="DfQ-XX-xII" id="H92-Zq-2u2"/>
        <outlet property="phoneNumberRequiredTextField" destination="l86-0I-WbN" id="CGi-on-wOu"/>
        <outlet property="phoneNumberTextField" destination="ykM-gm-kv4" id="MbB-FK-z0c"/>
        <outlet property="saveBtn" destination="4cS-bG-FbJ" id="XPF-Hi-Xtb"/>
        <outlet property="saveBtnBottomConstant" destination="Zor-Jg-W1u" id="UJd-is-ceY"/>
    </connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ssH-lW-xhj" userLabel="First Responder" sceneMemberID="firstResponder"/>

1 个答案:

答案 0 :(得分:1)

我已将您的情节提要粘贴到Test项目中,并尝试调试此问题。发现ScrollViewStackView之间的视图(在下面的屏幕快照中以红色突出显示)被删除并且StackView直接放置在Container ScrollView内时,{{1} }成为可点击的。

您提供的故事板:

enter image description here

在Container Scroll视图中删除视图并将StackView直接移到Container ScrollView下。

enter image description here

删除该中间视图后的模拟器屏幕截图

enter image description here