我是新来的自动布局。有人可以解释为什么这不起作用吗? MAFeedbackCell是两个标签的容器。容器中还有其他标签,但这两个:0xaa3aca0
和0x14395240
是有冲突的。iOS AutoLayout约束
2014-09-28 08:38:26.056 beats[1052: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:0xaa3aea0 UILabel:0xaa3aca0.width <= 0.125*MAFeedbackCell:0x14394d90.width>",
"<NSLayoutConstraint:0xa657130 H:|-(1)-[UILabel:0xaa3aca0](LTR) (Names: '|':MAFeedbackCell:0x14394d90)>",
"<NSLayoutConstraint:0x143955c0 H:[UILabel:0xaa3aca0]-(1)-[UILabel:0x14395240](LTR)>",
"<NSLayoutConstraint:0x143959c0 UILabel:0x14395240.width == UILabel:0xaa3aca0.width>",
"<NSLayoutConstraint:0xa558fc0 UILabel:0x14395240.right == MAFeedbackCell:0x14394d90.right - 1>",
"<NSLayoutConstraint:0xa541660 'UIView-Encapsulated-Layout-Width' H:[MAFeedbackCell:0x14394d90(231)]>"
)
谢谢您的详细解答! – marosoaie 2014-09-28 06:00:37
真棒解释。这一直是Android比iOS更“容易”的地方!嘿! – Fattie 2014-09-28 06:49:30