首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >新的iPhone developer错误

新的iPhone developer错误
EN

Stack Overflow用户
提问于 2014-09-03 16:06:04
回答 1查看 46关注 0票数 0

我正在创建一个单视图应用程序。

然后在故事板上,我将一个标签拖到页面的中间。然后在任何设备上将约束设置为中间

当我在iPhone retina 4英寸上运行时,它工作正常,当我在iPhone retina 3.5英寸上运行时,我得到以下错误

代码语言:javascript
复制
2014-09-03 11:02:35.136 Testing[3879:60b] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.       
Try this: (1) look at each constraint and try to figure out which you don't expect; (2) 
find the code that added the unwanted constraint or constraints and fix it. (Note: If 
you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to   
the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
"<NSLayoutConstraint:0x8e9b760 V:[_UILayoutGuide:0x8e876a0]-(253)-[UILabel:0x8e99cc0]>",
"<NSLayoutConstraint:0x8e9b790 V:[UILabel:0x8e99cc0]-(274)-[_UILayoutGuide:0x8e9b010]>",
"<_UILayoutSupportConstraint:0x8e9b410 V:[_UILayoutGuide:0x8e876a0(20)]>",
"<_UILayoutSupportConstraint:0x8e98f10 V:|-(0)-[_UILayoutGuide:0x8e876a0]   (Names: '|':UIView:0x8e99ae0 )>",
"<_UILayoutSupportConstraint:0x8e97de0 V:[_UILayoutGuide:0x8e9b010(0)]>",
"<_UILayoutSupportConstraint:0x8e9b7c0 _UILayoutGuide:0x8e9b010.bottom == UIView:0x8e99ae0.bottom>",
"<NSAutoresizingMaskLayoutConstraint:0x8e9e2e0 h=--& v=--& V:[UIView:0x8e99ae0(480)]>"

)

请注意,约束的错误在顶部约束上。可能是因为酒吧吧。有什么帮助吗?

EN

回答 1

Stack Overflow用户

发布于 2014-09-03 17:37:11

好的,我自己解决。

只需要苹果视网膜英寸3.5的形状因子,而不是视网膜英寸4.0的形状因子。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25639298

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档