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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -