ios - Resolving a TextView with vertically ambiguous constraints -
here picture of problem:
the error message says height , vertical positions ambiguous "picture message text view".
and here constraints picturemessagetextview
:
now, when change height height constraint height >= 100
height = 100
, error goes away. however, if keep way now, error remains. , reason why want height constraint height >= 100
can increase in size depending on size of text inside textview. suggestions rid of error?
you have ambiguity because defined many constraints. rule of thumb have both leading , trailing space contraints or 1 of them dynamic width(width>=100 instance). same applies vertical(top, bottom , dynamic height). when have of 3 constriants defined either vertical or horizontal space, you'll ambiguity problem.
if use center vertically or horizontally, you're simultaniously setting leading , trailing(or top , bottom respectively) equal each other adding dynamic width (or height) cause ambiguity in similar fashion
Comments
Post a Comment