如果我为我的 xib 文件打开“使用自动布局”功能,应用程序会崩溃。
控制台上的错误是:
“ -[NSAutoresizingMaskLayoutConstraint _setSymbolicConstant:constant:], /SourceCache/AppKit/AppKit-1138.51/Layout.subproj/NSLayoutConstraint.m:596 中的断言失败”。
如果我禁用此功能,应用程序运行顺利。我也尝试过[View setTranslatesAutoresizingMaskIntoConstraints:NO]
,但结果相同。
在 Mountain Lion 和一些 Lion 机器上运行良好。
操作系统:Mac OS X Lion 10.7.5(11G56)。谁能帮我解决这个错误。
提前致谢。