If you specify automatic masking instead of restrictions or do not specify restrictions at all, then the view will have NSAutoResizingMaskLayoutConstraint restrictions, not NSLayoutConstraints. If you set translatesAutoresizingMaskIntoConstraints to NO , then these restrictions are not displayed. You cannot mix and match in one view, or you get unsatisfactory constraint errors.
I set up a quick test project with various combinations of autoresist masks, and the logging format is pretty simple.
h= or v= indicates that we are talking about bans in the horizontal or vertical direction.- indicates a fixed size& indicates flexible size- Character order represents margin, size, margin
Therefore, h=&-& means that you have left and right margins and a fixed width, v=-&- means fixed upper and lower margins and flexible height, etc.
jrturton Jan 18 '13 at 22:56 2013-01-18 22:56
source share