Text labels not displaying full text when in stack view

I have put 2 text labels in a horizontal stack view. When I run the program, the text labels are not showing the text fully.


How are you configuring the labels? Remember to set the numberOfLines to 0 if you want to display all the text. If that does not work, check your layout constraints to see if if the label (and parent stack view) is being compressed, if so, set the compression resistance priority on the label to ensure it gets priority in being its own size

Code Block swift
let label = UILabel()
label.numberOfLines = 0
/* compression resistance */
label.setContentCompressionResistancePriority(.required, for: .vertical)

Text labels not displaying full text when in stack view
 
 
Q