ios - How to handle long text UILabel -


i have view has lot of labels. of them text set dynamically. text long display within 1 line. know how can display text in multiple lines. problem when display text in multiple lines margins broken between labels. label swapes content of next label.

i want avoid fixing "by hand" (repositioning of other elements). maybe autolayout can fix this, sadly i'm not able use now. argument convert project springs&struts autolayout. however, maybe there way fix issue. nice if can me out. in advance!

you can use sizewithfont:constrainedtosize:linebreakmode: calculate height required each of labels. should use in loop iterates on each label in order should appear on screen. go, increment y position height of current label , margin. each label have correct position , @ end of loopy hold full required height.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -