ios - Adjusting UILabel width in XIB -


i trying add 2 uilabels in container view , adjusting size of labels according content inside. working fine except 1 thing. want width of labels adjusted according first label having text a , number of lines of second label should change if content in second label more first label. here constraints labels.

constraints text a

constraints text b text b

output view

make sure label b has width constraint (it not width expand indefinitely fit content) ensure label b has numberoflines set zero. setting available in interface builder.

i'm assuming constraints container has fixed width , height free expand fit labels.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -