⚠️I init a footer view and have set its frame. The footer view's subview (such as UILabel,UIButton) use masonry to do constrain their left and right margin , but Xcode say i shouldn't set subview's right margin, why? And after i set it's width, everything become ok, but it 's not elegant
2017-03-22 18:02:54.427511 UMSMposI[57173:313304] [LayoutConstraints] 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.
(
"<MASLayoutConstraint:0x6000002af2a0 UIButton:0x7f9c63581d70.left == MposAddCashierFooterView:0x7f9c63581500.left + 50>",
"<MASLayoutConstraint:0x6000002b0140 UIButton:0x7f9c63581d70.right == MposAddCashierFooterView:0x7f9c63581500.right - 50>",
"<NSLayoutConstraint:0x60800009d6f0 MposAddCashierFooterView:0x7f9c63581500.width == 0>"
)
Will attempt to recover by breaking constraint
<MASLayoutConstraint:0x6000002b0140 UIButton:0x7f9c63581d70.right == MposAddCashierFooterView:0x7f9c63581500.right - 50>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017-03-22 18:02:54.430166 UMSMposI[57173:313304] [LayoutConstraints] 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.
(
"<MASLayoutConstraint:0x6080002aaaa0 UILabel:0x7f9c63581ae0.left == MposAddCashierFooterView:0x7f9c63581500.left + 25>",
"<MASLayoutConstraint:0x6080002aaec0 UILabel:0x7f9c63581ae0.right == MposAddCashierFooterView:0x7f9c63581500.right - 25>",
"<NSLayoutConstraint:0x60800009d6f0 MposAddCashierFooterView:0x7f9c63581500.width == 0>"
)
Will attempt to recover by breaking constraint
<MASLayoutConstraint:0x6080002aaec0 UILabel:0x7f9c63581ae0.right == MposAddCashierFooterView:0x7f9c63581500.right - 25>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
New Issue Checklist
🚫 If this template is not filled out your issue will be closed with no comment. 🚫
Issue Info
Issue Description
⚠️I init a footer view and have set its frame. The footer view's subview (such as UILabel,UIButton) use masonry to do constrain their left and right margin , but Xcode say i shouldn't set subview's right margin, why? And after i set it's width, everything become ok, but it 's not elegant
footer view init code
footer view subview use masonry
Xcode alert message
⚠️