ios - Regular spacing with AutoLayout -


this question may seem simple autolayout expert, still out of own usual autolayout usage. used play .top, .bottom, .left, .right, .centerx, .centery attributes. how do when dealing few objects?

for example, if have 5 uilabel(s), , want them vertically aligned, regular spacing. x-axis part, easy:

    myxconstraint = nslayoutconstraint(item: label1,         attribute: .centerx,         relatedby: .equal,         toitem: superview,         attribute: .centerx,         multiplier: 1.0,         constant: 0.0); 

with constraint 1 on each of 5 labels, vertically aligned.

but how should write other constraints, label1 appears @ top, label2, label3 ….. label5. , want space @ top, 1 @ bottom , spaces between each consecutive label same value.

create 6 spacer views.

refer here.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -