2012-10-22 203 views
1

我刚开始为iOS编程。我尝试添加一个简单计算器的输入按钮并改变其大小,但Xcode不断崩溃。这是报告:Xcode不断崩溃

Process:   Xcode [406] 
Path:   /Applications/Xcode.app/Contents/MacOS/Xcode 
Identifier:  com.apple.dt.Xcode 
Version:   4.5.1 (1842) 

Crashed Thread: 0 Dispatch queue: com.apple.main-thread 

Exception Type: EXC_CRASH (SIGABRT) 
Exception Codes: 0x0000000000000000, 0x0000000000000000 

Application Specific Information: 
ProductBuildVersion: 4G1004 
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1929/IBPlugin/Utilities/IBObjectMarshalling.m:651 
Details: Failed to arbitrate IBNSLayoutConstraint, IBUIButton, IBUILabel, IBUIView, and IBUIViewController. 

Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report. 

Exception name: IBAssertionFailure 
Exception reason: ASSERTION FAILURE: 
Reason:  All views needing candidate constraints have already had constraints generated. This most likely indicates a bug involving layout of the following views: 
    Layout engine frame ({{20, 20}, {282, 36}}) of <UILabel: 0x81f5560; frame = (20 20; 281 36); text = '0'; clipsToBounds = YES; opaque = NO; autoresize = TM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x815cdd0>> does not match canvas frame ({{20, 20}, {281, 36}}) 

我已经尝试重新安装Xcode和重置iOS模拟器以及。我有山狮。

+0

我的猜测是,你有一个损坏的xib fil即 –

+0

确认您的约束条件具有不同于0的乘数 – Fogia

回答

2

试试这个步骤:

1)故事板右键单击导航

2)单击显示文件检查器

3)取消选中 “使用自动布局”

希望这有助于

+0

+1崩溃报告实际上指向自动布局错误。 – Abizern