ios - UILabel positioning different when text is present vs when text isn't present -


here picture of how want view positioned (i have constraints set in interface builder)

below images want , how set in interface builder (pic # 1)

the second 1 interface @ runtime.

note: once labels textual data during runtime, view expands give labels space (i.e. first picture)

my goal eliminate "animated movement". want view/progress bar/everything remain static once has been situated @ runtime , not bouncing , down if data in labels or if isn't.

i not want use stack view because ios 7 not supported feature or would.

enter image description here

enter image description here

note: it's different colors, same view problem shows stated in question. lazy , don't want explain myself how lazy , why different...

you should add height constraint constant, e.g. 20, , relation "greater or equal" each of labels. way autolayout know exact height needed before label text set, , allow labels stretch vertically if text long 1 line


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -