ios - Autoshrink feature of Label in Tableview cell on scrolling doesn't work -
i have 2 labels side side in custom cell of tableview. when adding data first time looks :
which fine , required design .
problem occurs when start scrolling tableview. after going down in tableview , coming changes this:
first label has autoshrink feature added not in second label. doing in storyboard except data poulating part. please tell me if doing wrong in it.
any appreciated.
**edit: **
the custom cell have added in project:
there 2 labels have highlighted selecting them.
constraints first label are:
i have added auto shrink feature in first label :
constraints second label are:
i haven't added auto shrink feature in second label have keep fixed font size in second label.
finally after reading more content hugging priority
, content compression resistance priority
got solution.
thanks blog too:
i changed priority follows:
for first label:
for second label :
and working fine.
Comments
Post a Comment