swift - Positioning of labels according to the length of the text -


i have requirement of displaying labels in table view.the number of labels in tableview cell , length of generating dynamically.

for example if user selects 10 names in popup, names should displayed in 10 different labels in tableviewcell , length of text may vary...how achieve this....thanks in advance

enter image description here

try use

thelabeltouse.sizetofit() 

first concatenate strings of different names single string want display in label. update label frame fit content.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -