ios - 开始和结束标签不匹配 - Xcode Storyboard 错误
问题描述
合并冲突后,我需要删除一些添加到不同文件中的字符,完成此操作后,我收到此错误:
第 621 行:开始和结束标记不匹配:textView 第 557 行和子视图
第 557 行:
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="0L0-L4-EMJ" userLabel="Job Text View" customClass="RoundText" customModule="Arvice" customModuleProvider="target">
第 621 行:
</subviews>
557-621 之间行的完整代码:
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="0L0-L4-EMJ" userLabel="Job Text View" customClass="RoundText" customModule="Arvice" customModuleProvider="target">
<rect key="frame" x="16" y="372" width="343" height="225"/>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="0L0-L4-EMJ" userLabel="Job Text View" customClass="RoundText" customModule="Arvice" customModuleProvider="target">
<rect key="frame" x="16" y="128" width="343" height="325"/>
<color key="backgroundColor" red="0.43529411759999997" green="0.4431372549" blue="0.47450980390000003" alpha="0.75296982020547942" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="225" id="VOt-bF-NX1"/>
</constraints>
<color key="textColor" red="1" green="0.96078431369999995" blue="0.019607843140000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="Brandish" family="Brandish" pointSize="18"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="1" green="0.96078431369999995" blue="0.019607843140000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="30"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="grV-x2-o7U" customClass="CustomizableButton" customModule="Arvice" customModuleProvider="target">
<rect key="frame" x="16" y="611" width="343" height="40"/>
<rect key="frame" x="16" y="392" width="343" height="30"/>
<color key="backgroundColor" red="0.43529411759999997" green="0.4431372549" blue="0.47450980390000003" alpha="0.75296982020000003" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="en1-xh-J1M"/>
</constraints>
<fontDescription key="fontDescription" name="Brandish" family="Brandish" pointSize="18"/>
<state key="normal" title="Add "/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="postPressed:" destination="ZTf-cm-rjD" eventType="touchUpInside" id="gEw-Za-Xl5"/>
</connections>
</button>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XAx-Sp-9p1" customClass="GADBannerView">
<rect key="frame" x="0.0" y="64" width="375" height="22"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GVF-qY-rRW">
<rect key="frame" x="99" y="189" width="176" height="175"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tOi-sI-3OX" customClass="RoundLabel" customModule="Arvice" customModuleProvider="target">
<rect key="frame" x="69" y="136" width="290" height="45"/>
<color key="backgroundColor" red="0.43529411759999997" green="0.4431372549" blue="0.47450980390000003" alpha="0.75296982020000003" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="tfM-0s-pL1">
<rect key="frame" x="16" y="136" width="45" height="45"/>
<constraints>
<constraint firstAttribute="width" constant="45" id="Tnf-xp-PXp"/>
<constraint firstAttribute="height" constant="45" id="vEc-bG-e1e"/>
</constraints>
</imageView>
</subviews>
解决方案
您有两个textView
标签相同id="0L0-L4-EMJ"
但只有一个结束标签。看起来像合并问题。
推荐阅读
- android - Gradle 4.9 + Lombok 1.18.0 失败
- angular - 如何处理具有两个主要部分的角度项目的路由器插座
- mysql - 限制 MySQL 表之间 JOIN 中的行数
- c# - Web App Bot 不包含 C# 的 LUIS 模板
- java - 无法使用 IntelliJ IDEA 运行配置获得 ActiveJDBC 动态检测
- ios - 使用未声明类型的 UITextfield
- list - 如何使用 FutureBuilder 使用 List 数据构建 ListTile
- python - 映射多个值而无需硬编码
- javascript - AJAX 表单中不同步骤的不同 CSS 文件
- android-studio-3.1.3 - 无法获取 gradle-3.1.3.pom android studio