mercredi 6 mai 2015

AutoLayout create constraints programatically

enter image description here

How to correct pin black view to red view with padding I displayed using NSLayoutConstraint constraintWithItem.

So I placed red view in blue container with constraints. It works for me. So red square has appropriate width let's say 50pt and the same height. I've pin it to the left and top sides of blue container.

My goal is to pin black view to red view with some distance (yellow line) from red view say 5pt and then black view should stretch to the right side of blue container and for example green line should be 10pt.

So the lines just show const distances between views.

Aucun commentaire:

Enregistrer un commentaire