swift - Set UIView height to fit UILabel subview using autolayouts -


what try do

i have custom uiview uilabel subview in it. want uiview wrap uilabel height , set it´s height depending of text length. uilabel resizing it´s height correctly when adding text label.text. far good.

problem

the uiview not adjusting height uilabel content. text should inside white uiview below. should possible solve constraints, correct? can´t right though. can done purely storyboard or have manually set uiview height in code?

enter image description here

the result: enter image description here

try setting content hugging property of uilabel superview in interface builder 1000:

enter image description here


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -