iPad 上的 NSLayoutConstraint SIGABRT [英] NSLayoutConstraint SIGABRT on iPad

查看:58
本文介绍了iPad 上的 NSLayoutConstraint SIGABRT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序是在界面构建器中制作的.iPhone 和 iPad 的单独故事板.项目在带有最新 iO 的 iPhone 模拟器、iPad 模拟器、iPhone 4 上运行并正常工作,但是当我在 2012 年春季使用 iOs 5.1 的新 iPad"上构建它时出现此错误.修复/解释?

Application is made in Interface builder. Seperate storyboards for iPhone and iPad. Project runs and works properly on iPhone Simulator, iPad Simulator, iPhone 4 with newest iOs, but I get this error when I build it on 'new iPad' spring 2012 with iOs 5.1. Fix/explanation?

2012-12-12 16:44:16.763 LNG[397:707] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x32b7488f 0x34b19259 0x32b74789 0x32b747ab 0x3536254d 0x353626bb 0x35362423 0x352f3001 0x352613c7 0x3513ec59 0x350b4c17 0x350b3461 0x350a5e87 0x351167d5 0x350b3e6d 0x350ad7dd 0x3507bac3 0x3507b567 0x3507af3b 0x32c1822b 0x32b48523 0x32b484c5 0x32b47313 0x32aca4a5 0x32aca36d 0x350ac86b 0x350a9cd5 0x84ad 0x8448)
terminate called throwing an exception(lldb) 

推荐答案

新的 autolayout 机制仅适用于 iOS 6.0+,并且它崩溃的设备是 5.1.

The new autolayout mechanism is iOS 6.0+ only, and the device it is crashing on is 5.1.

要修复它,请在 Interface Builder 中加载 XIB,选择 File Inspector 选项卡,然后取消选中 Use autolayout.或者,如果您绝对必须具有自动布局,您可以定位 iOS 6.0+-only 设备并更改最小目标.

To fix it, load the XIB in Interface Builder, select the File Inspector tab, and uncheck Use autolayout. Alternatively, you can target iOS 6.0+-only devices and change the minimum target, if you absolutely must have autolayout.

这篇关于iPad 上的 NSLayoutConstraint SIGABRT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆