com.apple.InterfaceBuilder error -1. Storyboard Can Not Be Opened

a 夏天 提交于 2019-12-02 00:55:35

This error can occur, when an additional but not installed font is used. Install this font and open the storyboard again.

If the error was after a git merge, then i suggest you to clean the inferredMetricsTieBreakers at your Storyboards bottom.

  1. Open Storyboard as Source Code (what else could you do?)
  2. find inferredMetricsTieBreakers block
  3. remove all <segue reference=""/>
  4. Open Storyboard as Interface Builder - Storyboard
  5. Profit!

I would hazard a guess that the location that the project file is using is likely not the same as the one you copied over. This can happen easily if you pull in a file from outside your project directories. A quick manual reconnection can be done like so:

  1. Find the file in the Project Navigator. Right-click it (or the equivalent) and select Delete. In the pop-up that appears, select Remove Reference.
  2. Still in Project Navigator, right-click on the folder that that file was formerly listed under and choose Add Files To "Your Project Name". Track down the location of the file and Add it. It should appear in the Project Navigator again.

I don't know how my experience relates to yours, but I had the same issue and was finally able to resolve it by removing an activity indicator view via the storyboard's XML. Specifically, the code I removed was this:

<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750” verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" id="XNx-FL-WkR">
    <rect key="frame" x="15" y="80" width="20" height="20"/>
    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</activityIndicatorView>

When I removed these lines of XML and switched back to the Interface Builder view, XCode removed an outlet the indicator was connected to (just one line).

Hope that helps someone! I'll update my answer if I find an explanation for why this fixed the problem for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!