0

我的编译器在尝试编译故事板中包含 UITimerPicker 的代码时会失败。奇怪的是,这也发生在 iOS5 模拟器和设备上,但在 iOS6 上就可以了。

结果如下所示:

2012-10-16 12:21:13.454 biztrip[7263:15203] 找不到映射图像 UITimerPickerBackground-162.png

2012-10-16 12:21:13.489 biztrip[7263:15203] 找不到映射图像 UITimerPickerFrameLeft-162-Bar.png

2012-10-16 12:21:13.490 biztrip[7263:15203] 找不到映射图像 UITimerPickerFrameMiddle-162.png

2012-10-16 12:21:13.491 biztrip[7263:15203] 找不到映射图像 UITimerPickerFrameRight-162-Bar.png

2012-10-16 12:21:13.506 biztrip [7263:15203] *由于未捕获的异常“NSInvalidUnarchiveOperationException”而终止应用程序,原因:“无法实例化名为 NSLayoutConstraint 的类”

最奇怪的想法是当我不使用情节提要时,但 xib 文件一切正常。

任何建议将不胜感激。

4

1 回答 1

1

Here is your issue: 'Could not instantiate class named NSLayoutConstraint'. This means you are using auto-layout option. Auto-layout is iOS6 feature, that is why it's not working in iOS5 simulator.

Go to your storyboard, select ViewController (you'll have to do it for every ViewController) and uncheck Use Autolayout from File Inspector in the Utilities pane (pane on the right in Xcode).

Hope this helps.

于 2012-10-16T17:52:39.010 回答