Interface Builder XIB Compiler error

只谈情不闲聊 提交于 2020-01-02 18:07:18

问题


I get this error message when connecting two UISwipeGestureRecognizers to a single view in my project inside of a XIB file (though not in a new project, curiously). Anybody know what this error means? It is a compile error, not a runtime error. I'm using Xcode 4.4 (this error doesn't happen on Xcode 4.5 actually). This is an error from inside interface builder.

Assertion failure in -[IBCocoaTouchToolObjectPackage connectionsByProcessingConnections:], /SourceCache/IBSimulatorComponents/IBSimulatorComponents-223/IBCocoaTouchTool/IBCocoaTouchToolObjectPackage.m:1132012-08-03 16:52:01.428 Interface Builder Cocoa Touch Tool[5646:11903] Exception producing nib: Mismatched addsContentToExistingCollection value for the coalescing outlet connection & one of its fragments.


回答1:


I suspect this occurs because Interface Builder allows your outlets to get into an inconsistent state. It's a logic bug in Interface Builder that manifests as a run-time exception in the ibtool compiler. I was able to work around it by disconnecting the outlets and outlet collections I had recently created, and then rewiring them.




回答2:


I was actually able to get rid of the error by deleting the entire Panel in the XIB, and then just undoing the delete. Clean + Build and the error was gone. Not sure if that will work for others as well.



来源:https://stackoverflow.com/questions/11791710/interface-builder-xib-compiler-error

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