我刚开始为 iOS 编程。我尝试为一个简单的计算器添加一个输入按钮并更改其大小,但 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 模拟器。我有山狮。