Just created a demo single view controller project. Controller view contains collection view, and it contains cell view (orange). Cell view contains a view (selected inside) and I need to align it to bottom of cell view. However, when I select orange view inside cell view, press Ctrl and drag it to cell view I don't see "Align bottom to container view" or similar. There's only "Bottom Space to Container" selection and I'm not sure does it have the same behaviour:
And if I select "Bottom Space to Container" and don't get desired "Align bottom to parent" system constraint:
I need to add a new label in existing code base with auto layout, and the label must be positioned next to existing label that has "Align bottom to: parent cell" system constraint:
There's some setting "Bottom edges" if I select my new label and press align button icon at the bottom. However, this selection is disabled anyways and I assume this is user constraint but I need system constraint "Align bottom to: parent cell". Any suggestions why existing label has this constraint but I can't add a similar one to the new label?
Just faced the situation in which the bottom constraint was being pinned to the Bottom Layout Guide
(a TabBar, in my case) instead of to the superview
, as I wanted.
After tinkering around with programmatically created and or modified constraints, I found that you could actually do it through Autolayout's Pin Popover, just by selecting View
instead of Bottom Layout Guide
in the drop down that appears if you clic on the little arrow of the constraint's textfield.
That was, probably, not very clear, so here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With