I'd like to have a small grid with 3 rows and 2 columns. The first column has a number 1..3, the second text. Each row is created with two UILabel fields in a horizontal StackView, all these are themselves contained in a vertical StackView. This outer StackView has leading, trailing, top and bottom constraints to its super view to keep it in place.
This is the view controller scene from Xcode 9
The outer StackView 'Steps' has:
Axis = Vertical
Alignment = Fill
Distribution = Fill Proportionally
Each of the row StackViews has:
Axis = Horizontal
Alignment = Center
Distribution = Fill Proportionally
If've got two problems: a) XCode's StoryBoard does not show anything i.e., I see a big white, empty ViewController. Clicking the components in the inspector I can see the outlines of where 'stuff' should show but, I see none of the text, nana. b) When I run the 'app' it actually shows the text where it should be, however, i get the following in the debugger output:
2018-03-22 13:41:33.423864-0700 stackview_test[35635:4781389] [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.
(
"<NSLayoutConstraint:0x60c000089d80 'fittingSizeHTarget' UIStackView:0x7feb69614b00.width == 0 (active)>",
"<NSLayoutConstraint:0x60c00008f050 'UISV-canvas-connection' UIStackView:0x7feb69614b00.leading == UILabel:0x7feb69614d00'2'.leading (active)>",
"<NSLayoutConstraint:0x60c00008f190 'UISV-canvas-connection' H:[UILabel:0x7feb69614fe0'Lorem ipsum dolor sit ame...']-(0)-| (active, names: '|':UIStackView:0x7feb69614b00 )>",
"<NSLayoutConstraint:0x60c00008f910 'UISV-spacing' H:[UILabel:0x7feb69614d00'2']-(20)-[UILabel:0x7feb69614fe0'Lorem ipsum dolor sit ame...'] (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60c00008f910 'UISV-spacing' H:[UILabel:0x7feb69614d00'2']-(20)-[UILabel:0x7feb69614fe0'Lorem ipsum dolor sit ame...'] (active)>
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.
2018-03-22 13:41:33.428202-0700 stackview_test[35635:4781389] [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.
(
"<NSLayoutConstraint:0x60800008da20 'fittingSizeHTarget' UIStackView:0x7feb696156e0.width == 0 (active)>",
"<NSLayoutConstraint:0x60c0000903b0 'UISV-canvas-connection' UIStackView:0x7feb696156e0.leading == UILabel:0x7feb69615de0'3'.leading (active)>",
"<NSLayoutConstraint:0x60c000090450 'UISV-canvas-connection' H:[UILabel:0x7feb696160c0'At vero eos et accusamus ...']-(0)-| (active, names: '|':UIStackView:0x7feb696156e0 )>",
"<NSLayoutConstraint:0x60c000090770 'UISV-spacing' H:[UILabel:0x7feb69615de0'3']-(20)-[UILabel:0x7feb696160c0'At vero eos et accusamus ...'] (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60c000090770 'UISV-spacing' H:[UILabel:0x7feb69615de0'3']-(20)-[UILabel:0x7feb696160c0'At vero eos et accusamus ...'] (active)>
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.
Any idea what is going on? I'd sure appreciate your insights.