gpt4 book ai didi

ios - Storyboard冲突 iOS 后 XML 标记不匹配

转载 作者:行者123 更新时间:2023-11-28 23:46:19 24 4
gpt4 key购买 nike

  <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qxz-gx-8Ik">
<rect key="frame" x="275" y="5" width="30" height="33"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qxz-gx-8Ik">
<rect key="frame" x="282" y="2" width="30" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Edit">
<color key="titleColor" red="1" green="0.59999999999999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="updateAction:" destination="akK-dA-Jb1" eventType="touchUpInside" id="UBU-1j-Tmg"/>
</connections>
</button>
</subviews>

我遇到了 Storyboard合并冲突,在选择保留远程分支的设置后,一些 gitmerge 文本被放入我的 Storyboard的 XML 内容中,例如

头<<<<<<<

==========

和>>>>>>>

我删除了这些行,但留下一条错误消息:

"Opening and ending tag mismatch : button line 1251 and subviews"

第 1251 行是我在这里发布的第一行以 button hidden = "YES"开头的行

当我将我的 XML 放入格式器中时,例如 https://www.freeformatter.com/xml-formatter.html ,它说:`

"Unable to parse any XML input. Error on line 13: The element type "button" must be terminated by the matching end-tag "</button>"." 

如何修复此错误?

最佳答案

你有“两个”按钮,那就是冲突。您需要删除前两行或删除下一行(第 3 和 4 行)。

<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qxz-gx-8Ik">
<rect key="frame" x="282" y="2" width="30" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Edit">
<color key="titleColor" red="1" green="0.59999999999999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="updateAction:" destination="akK-dA-Jb1" eventType="touchUpInside" id="UBU-1j-Tmg"/>
</connections>
</button>
</subviews>

或:

<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qxz-gx-8Ik">
<rect key="frame" x="275" y="5" width="30" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Edit">
<color key="titleColor" red="1" green="0.59999999999999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="updateAction:" destination="akK-dA-Jb1" eventType="touchUpInside" id="UBU-1j-Tmg"/>
</connections>
</button>
</subviews>

关于ios - Storyboard冲突 iOS 后 XML 标记不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52615342/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com