簡體   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