繁体   English   中英

Xcode 在打开故事板时崩溃

[英]Xcode crash on opening storyboard

我正在使用 Xamarin 为 iOS 开发应用程序。 最近,我无法在 Xcode 中访问我的故事板文件或编译我的应用程序,因为 Xcode 在打开 .storyboard 文件时立即崩溃。

错误消息如下:

ASSERTION FAILURE <br>
Details:  Creating an out of band arbitration unit with a view (<IBUITableViewCell: 0x7fa88d13a5d0>) as the root under another view (<IBUITableView: 0x7fa88cf000e0>) is not yet implemented.<br>The view would need to be in two arbitration units, the one above for positioning constraints, and the root of the one below for sizing constraints. <br>But then that means that subviews cannot have constraints that affect the size of the view, so the view must have ibExternalTranslatesAutoresizingMaskIntoConstraints set to YES.
<br>Object:   <IBUITableViewCell: 0x7fa88d13a5d0>
<br>Method:   -ibArbitrationUnitWasCreatedWithReceiverAsRootUnderParent:

我尝试将我的故事板重新设置为最后一个可用的版本(应用程序提交到应用程序商店的那个版本),奇怪的是,即使该版本也不起作用。
我的计划是手动删除和每个视图控制器并一个一个添加它们以找出错误所在。
但是我不明白为什么 XCode 在打开故事板时会崩溃,而不仅仅是向我显示 xml 中错误的确切位置。

因此,如果有人以前遇到过这个问题并且有比手动执行更好的解决方法,我将非常感谢您的帮助。

ibExternalTranslatesAutoresizingMaskIntoConstraints needs to be YES

听起来 Storyboard 是使用引入此问题的较旧 Xamarin.iOS 创建的。

最快的解决方案是在 vi(或 Xcode/View As Source,或您选择的其他文本编辑器)中打开故事板,并将所有 translatesAutoresizingMaskIntoConstraints="NO" 替换为 ""。

保存文件,在 Storyboard 编辑器中重新打开它并修复您的限制。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM