ios - Multiline UILabel with auto layout does not work -
i'm trying set constraints multiline label in static table view cell, apparently not work me, label still in 1 single line. i've set numberoflines property 0 , height constraint greater or equal. , i'm setting height cell correctly in tableview:heightforrowatindexpath
. please have @ screenshot see settings in ib.
in comments above mentioned you're not setting preferredmaxlayoutwidth
. property tells label should lay out text on width of property's value. in uilabel.h:
if nonzero, used when determining -intrinsiccontentsize multiline labels
in other words, if don't set that, label's intrinsic content size whatever width label needs draw text. if set property label's bounds, start drawing on next line (or else cut text off if numberoflines
0).
in case, in tableview:willdisplaycell:forrowatindexpath:
.
Comments
Post a Comment